public virtual void OnSwitchUp() { if (UpCommand != null) { UpCommand.Execute(); } }
public override bool OnMouseClick(Vector2 Position, MouseButton Button) { // prevent from clicking two overlapping items at a time if (GetTopMostItem() != this) { return(false); } Window[] group = Parent.Windows.GetGroup(Group); int index = 0; for (; index < group.Length; index++) { if (group[index] == this) { break; } } if (Button == MouseButton.Left && leftClickEvent != null) { leftClickEvent.Execute(index); } else if (Button == MouseButton.Right && rightClickEvent != null) { rightClickEvent.Execute(index); } return(base.OnMouseClick(Position, Button)); }
public virtual void OnSwitchDown() { if (DownCommand != null) { DownCommand.Execute(); } }
public virtual bool OnButtonClick() { if (Command != null) { Command.Execute(); return(false); } return(false); }