Beispiel #1
0
        public void OnBeginDrag(PointerEventData eventData)
        {
            if (m_DraggedFileSheet != null)
            {
                return;
            }

            m_MoveToFrontButton.interactable = false;
            m_CanvasGroup.blocksRaycasts     = false;
            transform.SetAsLastSibling();
            m_DraggedFileSheet = this;
        }
Beispiel #2
0
        public void OnEndDrag(PointerEventData eventData)
        {
            if (m_DraggedFileSheet != this)
            {
                return;
            }

            transform.position           = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            m_CanvasGroup.blocksRaycasts = true;
            m_DraggedFileSheet           = null;
            //TODO >>>>>> Update File Data Position, Set bucket timeindex later
            DataCore.UpdateFilePosition(m_File.id, 0, transform.localPosition);
        }
Beispiel #3
0
        void ReloadAllSheets()
        {
            ClearAllSheets();

            for (int i = 0; i < m_Bucket.files.Count; i++)
            {
                File23    thisFile = m_Bucket.files[i];
                Transform newSheet = Instantiate(m_FileSheetPrefab);
                FileSheet script   = newSheet.GetComponent <FileSheet> ();
                newSheet.SetParent(m_FileContent, false);
                newSheet.localPosition = new Vector3(thisFile.m_UIPositionX, thisFile.m_UIPositionY, 0);
                script.SetFile(thisFile, 0).SetAnimationDelay(i * 0.25f);
                script.onMoveToFront = BringSheetToFront;
                m_FileSheet.Add(script);
            }

            //	Show files out
            foreach (FileSheet fs in m_FileSheet)
            {
                fs.StartAnimation();
            }
        }
Beispiel #4
0
 void BringSheetToFront(FileSheet sheet)
 {
     sheet.transform.SetAsLastSibling();
 }