Skip to content

ButtonAction

namespace Griff.Scenes;
public enum ButtonAction

What a Button does by itself when clicked, before any script hears about it.

  • None = 0: Nothing; scripts react with OnClick or Clicked.
  • LoadScene = 1: Switches to Scene.
  • RestartScene = 2: Starts the current scene over.
  • Quit = 3: Closes the game (in the editor, stops playing).
  • OpenPanel = 4: Opens the Panel named in Panel, e.g. an options panel from a pause menu.
  • ClosePanel = 5: Closes the panel the button is on: Resume on a pause menu, Back on an options panel.
  • Rebind = 6: Waits for the player to press a key or button, and makes it do InputAction from then on (a key or mouse button replaces the action’s first key or mouse button, a gamepad button its first gamepad button, or the one in BindingSlot; the rest stay; Esc cancels). It’s remembered next time. Label it “Jump: {Jump}” and it always shows the binding.
  • ResetControls = 7: Puts every action back to the game’s own controls, forgetting the player’s rebinding.
  • HostGame = 8: Hosts a network game others can join (see Multiplayer), then goes to Scene if it’s set: the menu’s “Host” button.
  • JoinGame = 9: Joins the network game at the address typed into a TextField for the join address (empty looks on the local network). Once in, the host’s scene loads by itself.
  • LeaveGame = 10: Leaves the network game (or stops hosting it), then goes to Scene if it’s set.
  • EndTurn = 11: Ends the turn of the side whose turn it is, in the scene’s TurnOrder, as its End Turn action does. It’s faded while this player can’t: the computer’s turn, between turns, another player’s turn.
  • Do = 12: Does an action on entities, as a Trigger does when its message arrives: Do on Targets (an RPG’s Attack, Cast Spell and Use Item on the hero, a door’s Open). It’s faded while none of them can do it now (a fighter off its turn, a spell without the mana).
  • SaveGame = 13: Saves the game in Slot (or the SaveSlot it’s on), replacing what was there: the scene as it is, where a talk has got to, the flags and a screenshot (see Game.SaveGame).
  • LoadGame = 14: Loads the game saved in Slot (or the SaveSlot it’s on). It’s faded while there’s none.
  • DeleteSave = 15: Forgets the game saved in Slot (or the SaveSlot it’s on or inside). It’s faded while there’s none.
  • QuickSave = 16: Saves the game in the Quick slot, to load again with a Quick Load button.
  • QuickLoad = 17: Loads the game saved with Quick Save. It’s faded while there’s none.
  • NewGame = 18: Starts the game over: forgets the progress kept in the save data (flags, saved inventories, what menus saved, best scores; not the player’s settings and controls, saved games or lines read) and goes to Scene: a menu’s “New Game”.
  • Continue = 19: Loads the game saved most recently, in any slot (quick saves too): a title screen’s Continue. It’s faded while there’s none.