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_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); }