Пример #1
0
        public override ShapeBase CreateShapeInstance()
        {
            UIShapeDialog shape = new UIShapeDialog("Dialog");

            //   shape.Position = EditorManager.Scene.CurrentShapeSpawnPosition;
            return(shape);
        }
Пример #2
0
        bool m_bCopying = false; // 복사중이므로, selectedShape 등의 처리는 복사도중에는 패스하고, 복사가 완료된 시점에서 처리

        public UIShapeBase CreateNewShape(UIShapeBase shape, UIShapeDialog parent, float PosX, float PosY)
        {
            UIShapeBase _newInst = (UIShapeBase)shape.Clone();

            _newInst.PosX = PosX;
            _newInst.PosY = PosY;

            EditorManager.Actions.Add(new AddShapeAction(_newInst, m_baseDialog, shape.ParentLayer, true));

            return(_newInst);
        }
Пример #3
0
        public void SelectUIShape(UIShapeBase shape)
        {
            if (m_bCopying == true)
            {
                return;
            }

            if (m_selectedShapeList.Contains(shape) == false)
            {
                m_selectedShapeList.Add(shape);                        // 선택에 넣음
            }
            if (shape == m_baseDialog || shape.Parent == m_baseDialog) // 작업 다이얼로그는 그대로
            {
                m_UIShapeList.Clear();

                foreach (ShapeBase child in m_baseDialog.ChildCollection)
                {
                    if (child is UIShapeBase)
                    {
                        m_UIShapeList.Add(child as UIShapeBase);
                    }
                }

                m_UIShapeList.Add(m_baseDialog); // 다이얼로그는 제일 마지막에 추가 ( 나중에 검색할때 가장 나중에 검색되도록 )

                return;
            }

            // 작업 다이얼로그가 변경됨
            if (shape is UIShapeDialog)
            {
                m_baseDialog = shape as UIShapeDialog;
            }
            else if (shape.Parent is UIShapeDialog)
            {
                m_baseDialog = shape.Parent as UIShapeDialog;
            }
            else
            {
                return;
            }

            m_UIShapeList.Clear();
            foreach (ShapeBase child in m_baseDialog.ChildCollection)
            {
                if (child is UIShapeBase)
                {
                    m_UIShapeList.Add(child as UIShapeBase);
                }
            }

            m_UIShapeList.Add(m_baseDialog); // 다이얼로그는 제일 마지막에 추가 ( 나중에 검색할때 가장 나중에 검색되도록 )
        }