コード例 #1
0
        /// <param name="editorGraphics">Owner EditorGraphics object that relays UI events to this element and manages its rendering.</param>
        /// <param name="isReceivingEvents">If true, new instance of GraphicalEventHandler is added to this graphical element.</param>
        /// <param name="parent">GraphicalElement position is calculated relative to Parent element. Can be null.</param>
        protected GraphicalElement(EditorGraphics editorGraphics, bool isReceivingEvents, GraphicalElement parent = null)
        {
            IsReceivingEvents = isReceivingEvents;
            if (isReceivingEvents)
            {
                GraphicalEventHandler = new GraphicalEventHandler();
            }

            Parent   = parent;
            Graphics = editorGraphics;
            Graphics.Register(this);
        }
コード例 #2
0
ファイル: ExitJoint.cs プロジェクト: vued/Creator
 public ExitJoint(EditorGraphics editorGraphics, GraphicalElement parent = null) : base(editorGraphics, true, parent)
 {
     renderer = new ExitJointRenderer(this, editorGraphics.ColorPalette);
 }
コード例 #3
0
ファイル: AddStepButton.cs プロジェクト: vued/Creator
 public AddStepButton(EditorGraphics editorGraphics, GraphicalElement parent = null) : base(editorGraphics, true, parent)
 {
     renderer = new AddStepButtonRenderer(this, editorGraphics.ColorPalette);
 }
コード例 #4
0
 public CreateTransitionButton(EditorGraphics editorGraphics, GraphicalElement parent = null) : base(editorGraphics, true, parent)
 {
     renderer = new CreateTransitionButtonRenderer(this, editorGraphics.ColorPalette);
 }
コード例 #5
0
 public bool RemoveChild(GraphicalElement child)
 {
     return(children.Remove(child));
 }
コード例 #6
0
 public void AddChild(GraphicalElement child)
 {
     children.Add(child);
 }