Exemplo n.º 1
0
        public G_Enum CloneChild(GuiElement parent)
        {
            G_Enum clone = (G_Enum)base.Clone(parent);

            //clone.Initialize();

            clone.btn_Text            = btn_Text.CloneChild(clone);
            clone.btn_Text.PressLeft  = clone.BtnTextPressLeft;
            clone.btn_Text.PressRight = clone.BtnTextPressRight;

            clone.btn_Arrow           = btn_Arrow.CloneChild(clone);
            clone.btn_Arrow.PressLeft = clone.BtnArrowPressLeft;
            //clone.btn_Arrow.PressRight = clone.BtnArrowPressRight;

            if (enumType != null)
            {
                clone.SetEnumType(enumType);
            }
            //clone.btn_Enums = new List<G_Button>();
            //for (int i = 0; i < btn_Enums.Count; i++)
            //{
            //    clone.btn_Enums.Add(btn_Enums[i].CloneChild(clone));
            //    clone.btn_Enums[i].PressLeft
            //}

            clone.ValueChanged = clone.MyValueChanged;

            if (clone.ValueChanged != null)
            {
                clone.ValueChanged(clone.enumValue);
            }

            //Initialize();
            return(clone);
        }
Exemplo n.º 2
0
        public G_NumBox CloneChild(GuiElement parent)
        {
            G_NumBox clone = (G_NumBox)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.MyValueChanged;
            return(clone);
        }
Exemplo n.º 3
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);
        }