Documentation ¶
Overview ¶
Package keybind centralizes the global hotkey bindings.
Whenever the app would need to query a hotkey like "F3" or "Ctrl-Z" is held down, it should use a method in this file. It can be expanded later to allow user customizable bindings or something.
NOTE: arrow key and gameplay controls not yet ported to here.
Index ¶
- func ClearLeftClick(ev *event.State)
- func CloseAllWindows(ev *event.State) bool
- func CloseTopmostWindow(ev *event.State) bool
- func DebugCollision(ev *event.State) bool
- func DebugOverlay(ev *event.State) bool
- func DoodadDropper(ev *event.State) bool
- func Down(ev *event.State) bool
- func EllipseTool(ev *event.State) bool
- func Enter(ev *event.State) bool
- func EraserTool(ev *event.State) bool
- func GotoEdit(ev *event.State) bool
- func GotoPlay(ev *event.State) bool
- func Help(ev *event.State) bool
- func Left(ev *event.State) bool
- func LeftClick(ev *event.State) bool
- func LineTool(ev *event.State) bool
- func MiddleClick(ev *event.State) bool
- func NewLevel(ev *event.State) bool
- func NewViewport(ev *event.State) bool
- func Open(ev *event.State) bool
- func Origin(ev *event.State) bool
- func PencilTool(ev *event.State) bool
- func RectTool(ev *event.State) bool
- func Redo(ev *event.State) bool
- func Right(ev *event.State) bool
- func Save(ev *event.State) bool
- func SaveAs(ev *event.State) bool
- func ShellKey(ev *event.State) bool
- func Shift(ev *event.State) bool
- func Shutdown(ev *event.State) bool
- func Undo(ev *event.State) bool
- func Up(ev *event.State) bool
- func Use(ev *event.State) bool
- func ZoomIn(ev *event.State) bool
- func ZoomOut(ev *event.State) bool
- func ZoomReset(ev *event.State) bool
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearLeftClick ¶
ClearLeftClick sets the primary mouse button state to false.
func CloseTopmostWindow ¶
CloseTopmostWindow (Backspace)
func DebugCollision ¶
DebugCollision (F4) can be checked one time.
func DebugOverlay ¶
DebugOverlay (F3) can be checked one time.
func DoodadDropper ¶
DoodadDropper (D) opens the doodad dropper in the editor.
func EllipseTool ¶
EllipseTool (C) selects this tool in the editor.
func EraserTool ¶
EraserTool (X) selects this tool in the editor.
func GotoEdit ¶
GotoEdit (E) opens the current played level in Edit Mode, if the player has come from the editor originally.
func MiddleClick ¶
MiddleClick of the mouse for panning the level.
func PencilTool ¶
PencilTool (F) selects the freehand pencil tool in the editor. GotoPlay (P) play tests the current level in the editor.
Types ¶
type State ¶
type State struct { State *event.State Shutdown bool // Escape key Help bool // F1 DebugOverlay bool // F3 DebugCollision bool // F4 Undo bool // Ctrl-Z Redo bool // Ctrl-Y NewLevel bool // Ctrl-N Save bool // Ctrl-S SaveAs bool // Shift-Ctrl-S Open bool // Ctrl-O ZoomIn bool // + ZoomOut bool // - ZoomReset bool // 1 Origin bool // 0 GotoPlay bool // p GotoEdit bool // e PencilTool bool LineTool bool RectTool bool EllipseTool bool EraserTool bool DoodadDropper bool ShellKey bool Enter bool Left bool Right bool Up bool Down bool Use bool }
State returns a version of event.State which is domain specific to what the game actually cares about.