Documentation ¶
Index ¶
Constants ¶
View Source
const ( NoInput InputMap = 0 // Allocated input bits. DOSKeyboardWithEscape InputMap = 1 NESKeyboardWithEscape InputMap = 2 FPSKeyboardWithEscape InputMap = 4 ViKeyboardWithEscape InputMap = 8 Gamepad InputMap = 16 DOSKeyboardWithBackspace InputMap = 32 NESKeyboardWithBackspace InputMap = 64 FPSKeyboardWithBackspace InputMap = 128 ViKeyboardWithBackspace InputMap = 256 // Computed helpers values. AnyKeyboardWithEscape = DOSKeyboardWithEscape | NESKeyboardWithEscape | FPSKeyboardWithEscape | ViKeyboardWithEscape AnyKeyboardWithBackspace = DOSKeyboardWithBackspace | NESKeyboardWithBackspace | FPSKeyboardWithBackspace | ViKeyboardWithBackspace DOSKeyboard = DOSKeyboardWithEscape | DOSKeyboardWithBackspace NESKeyboard = NESKeyboardWithEscape | NESKeyboardWithBackspace FPSKeyboard = FPSKeyboardWithEscape | FPSKeyboardWithBackspace ViKeyboard = ViKeyboardWithEscape | ViKeyboardWithBackspace AnyKeyboard = AnyKeyboardWithEscape | AnyKeyboardWithBackspace AnyInput = AnyKeyboard | Gamepad )
Variables ¶
View Source
var ( Left = (&impulse{Name: "Left", keys: leftKeys, padControls: leftPad}).register() Right = (&impulse{Name: "Right", keys: rightKeys, padControls: rightPad}).register() Up = (&impulse{Name: "Up", keys: upKeys, padControls: upPad}).register() Down = (&impulse{Name: "Down", keys: downKeys, padControls: downPad}).register() Jump = (&impulse{Name: "Jump", keys: jumpKeys, padControls: jumpPad}).register() Action = (&impulse{Name: "Action", keys: actionKeys, padControls: actionPad}).register() Exit = (&impulse{Name: "Exit", keys: exitKeys, padControls: exitPad}).register() Fullscreen = (&impulse{Name: "Fullscreen", keys: fullscreenKeys}).register() )
Functions ¶
func EasterEggJustHit ¶
func EasterEggJustHit() bool
func LoadFromDemo ¶
func LoadFromDemo(state *DemoState)
Types ¶
type DemoState ¶
type DemoState struct { InputMap InputMap `json:",omitempty"` Left *ImpulseState `json:",omitempty"` Right *ImpulseState `json:",omitempty"` Up *ImpulseState `json:",omitempty"` Down *ImpulseState `json:",omitempty"` Jump *ImpulseState `json:",omitempty"` Action *ImpulseState `json:",omitempty"` Exit *ImpulseState `json:",omitempty"` EasterEggJustHit bool `json:",omitempty"` }
func SaveToDemo ¶
func SaveToDemo() *DemoState
type ExitButtonID ¶ added in v1.0.59
type ExitButtonID int
const ( Escape ExitButtonID = iota Backspace Start )
func ExitButton ¶ added in v1.0.59
func ExitButton() ExitButtonID
type ImpulseState ¶
func (*ImpulseState) Empty ¶
func (i *ImpulseState) Empty() bool
func (*ImpulseState) OrEmpty ¶
func (i *ImpulseState) OrEmpty() ImpulseState
func (*ImpulseState) UnlessEmpty ¶
func (i *ImpulseState) UnlessEmpty() *ImpulseState
Click to show internal directories.
Click to hide internal directories.