コード例 #1
0
        public new G_B_Sprite CloneChild(GuiElement parent)
        {
            G_B_Sprite clone = (G_B_Sprite)base.Clone(parent);

            clone.Initialize();
            clone.sprite = (Sprite)sprite.Clone();
            return(clone);
        }
コード例 #2
0
        public G_ObjSelect CloneChild(GuiElement parent)
        {
            G_ObjSelect clone = (G_ObjSelect)base.Clone(parent);

            clone.btn           = btn.CloneChild(clone);
            clone.btn.PressLeft = clone.PressLeft;
            return(clone);
        }
コード例 #3
0
        public G_Plane CloneChild(GuiElement parent)
        {
            G_Plane clone = (G_Plane)base.Clone(parent);

            clone.guis = new List <GuiElement>();
            for (int i = 0; i < guis.Count; i++)
            {
                clone.guis.Add(guis[i].Clone(this));
            }
            return(clone);
        }
コード例 #4
0
        public G_Color CloneChild(GuiElement parent)
        {
            G_Color clone = (G_Color)base.Clone(parent);

            //clone.Initialize();

            clone.btn            = btn.CloneChild(clone);
            clone.btn.PressLeft  = clone.BtnPressLeft;
            clone.btn.PressRight = clone.BtnPressRight;

            clone.txt = txt.CloneChild(clone);
            clone.txt.ValueChanged = clone.TextChanged;

            clone.ValueChanged = clone.MyColorChanged;
            return(clone);
        }
コード例 #5
0
ファイル: G_TextBox.cs プロジェクト: bytinggames/BotChallenge
        public G_TextBox CloneChild(GuiElement parent)
        {
            G_TextBox clone = (G_TextBox)base.Clone(parent);

            //clone.TextChanged = null;

            if (ValueChanged != null)
            {
                clone.ValueChanged = (Action <object>)ValueChanged.Clone();
            }
            if (PressRight != null)
            {
                clone.PressRight = (Action)PressRight.Clone();
            }
            return(clone);
        }
コード例 #6
0
        public G_RectangleViewGrid CloneChild(GuiElement parent)
        {
            G_RectangleViewGrid clone = (G_RectangleViewGrid)base.Clone(parent);

            //clone.Initialize();

            clone.rect = (M_Rectangle)rect.Clone();

            clone.btn            = btn.CloneChild(clone);
            clone.btn.PressLeft  = clone.BtnPressLeft;
            clone.btn.PressRight = g => clone.PressRight();

            clone.txt = txt.CloneChild(clone);
            clone.txt.ValueChanged = clone.TextChanged;
            clone.txt.PressRight   = clone.PressRight;

            clone.ValueChanged = null;
            return(clone);
        }
コード例 #7
0
        public G_Button CloneChild(GuiElement parent)
        {
            G_Button clone = (G_Button)base.Clone(parent);

            //clone.PressLeft = null;
            //clone.PressRight = null;
            //clone.PressMiddle = null;
            if (PressLeft != null)
            {
                clone.PressLeft = (Action <G_Button>)PressLeft.Clone();
            }
            if (PressRight != null)
            {
                clone.PressRight = (Action <G_Button>)PressRight.Clone();
            }
            if (PressMiddle != null)
            {
                clone.PressMiddle = (Action <G_Button>)PressMiddle.Clone();
            }
            return(clone);
        }
コード例 #8
0
 public override GuiElement Clone(GuiElement parent)
 {
     return(CloneChild(parent));
 }
コード例 #9
0
ファイル: G_B_Text.cs プロジェクト: bytinggames/BotChallenge
        public new G_B_Text CloneChild(GuiElement parent)
        {
            G_B_Text clone = (G_B_Text)base.Clone(parent);

            return(clone);
        }
コード例 #10
0
 public void Add(GuiElement gui)
 {
     gui.depth += depth + 0.01f;
     guis.Add(gui);
     gui.parent = this;
 }