private void BtnTextPressLeft(G_Button btn) { if (btn_Arrow.pressed) { CloseList(); } else { int index; if (enumValue == null) { index = 0; } else { index = (int)Convert.ChangeType(enumValue, typeof(int)); index++; if (index >= Enum.GetValues(enumType).Length) { index = 0; } } enumValue = (Enum)Enum.GetValues(enumType).GetValue(index); if (ValueChanged != null) { ValueChanged(enumValue); } } }
private void BtnPressLeft(G_Button obj) { if (btn.pressed) { //action SetCatchUpdate(Update); rectOld = (M_Rectangle)rect.Clone(); } }
public void PressLeft(G_Button btn) { //if (btn.pressed) // Brush.SelectObjs(true); //else //{ // this.btn.text = Brush.selectedObjs.Count.ToString(); // if (ValueChanged != null) // ValueChanged(Brush.selectedObjs); // Brush.SelectObjs(false); //} }
private void BtnListPress(G_Button btn) { int index = btn_Enums.IndexOf(btn); enumValue = (Enum)Enum.GetValues(enumType).GetValue(index); if (ValueChanged != null) { ValueChanged(enumValue); } CloseList(); }
private void BtnArrowPressLeft(G_Button btn) { if (btn.pressed) { SetCatchUpdate(Update); } else { CloseList(); } //Game1.mouseCatched = MouseCatched.ObjEditor; //Game1.mbCatched = MBCatched.Static; }
private void BtnPressRight(G_Button btn) { if (!color.HasValue) { color = Color.Red; } else { color = Calculate.GetPrevColor(color.Value); } if (ValueChanged != null) { ValueChanged(color.Value); } }
private void BtnPressRight(G_Button btn) { if (value == null) { value = 0; } else { value -= increment; } MinMax(); if (ValueChanged != null) { ValueChanged(value); } }
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); }