public virtual void Cancel(Button button, Button.ButtonEventArgs e) { DestroyAndChildren(); cancelled = true; finished = true; cancelOptionEvent?.Invoke(this, null); }
void OnBuildPressed(Button.ButtonEventArgs args) { var prototype = (ConstructionPrototype)RecipeList.Selected.Metadata; if (prototype == null) { return; } if (prototype.Type != ConstructionType.Structure) { // In-hand attackby doesn't exist so this is the best alternative. var loc = Owner.Owner.GetComponent <ITransformComponent>().GridPosition; Owner.SpawnGhost(prototype, loc, Direction.North); return; } var hijack = new ConstructionPlacementHijack(prototype, Owner); var info = new PlacementInformation { IsTile = false, PlacementOption = prototype.PlacementMode, }; Placement.BeginHijackedPlacing(info, hijack); }
public void TabButtonPress(Button button, Button.ButtonEventArgs e) { foreach (Button b in tabButtons) { if (b != button) { b.SetDeActivated(); } } }
public void UpArrowPressed(Button button, Button.ButtonEventArgs e) { Debug.WriteLine("UpPress"); scrollPosition.Y--; foreach (ContextMenuItem menuItem in menuItems) { menuItem.transform.localPosition += new Vector2(0, 1) * buttonSize; } button.SetDeActivated(); InactivateObjectsOutOfScroll(); }
public virtual void No(Button button, Button.ButtonEventArgs e) { DestroyAndChildren(); finished = true; noOptionEvent?.Invoke(this, null); }
public override void No(Button button, Button.ButtonEventArgs e) { base.No(button, e); }
public override void Yes(Button button, Button.ButtonEventArgs e) { DestroyAndChildren(); EngManager.StartCoroutine(DoAttack()); }
public void Down(Button button, Button.ButtonEventArgs e) { ScrollPosition++; downArrow.SetDeActivated(); }
public void Up(Button button, Button.ButtonEventArgs e) { ScrollPosition--; upArrow.SetDeActivated(); }