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); }
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); }
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); }
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); }
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); }
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); }
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); }
public override GuiElement Clone(GuiElement parent) { return(CloneChild(parent)); }
public new G_B_Text CloneChild(GuiElement parent) { G_B_Text clone = (G_B_Text)base.Clone(parent); return(clone); }
public void Add(GuiElement gui) { gui.depth += depth + 0.01f; guis.Add(gui); gui.parent = this; }