Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorQuit error = errors.New("input.Event: normal termination")
error represents quit signal.
Functions ¶
This section is empty.
Types ¶
type ControlType ¶
type ControlType int8
const ( // these are used with EventControl, which controlls // scene flow. Typically, EventControl is sent when pushed special // key such as Ctrl-Any, Shift-Any, F1, F2, ..., ESC and etc. ControlNone ControlType = iota // dummy // starting skipping wait. skip means game flow is running // without any waits. ControlStartSkippingWait // stopping skipping wait. skip means game flow is running // without any waits. ControlStopSkippingWait // stop current running macro. ControlInterruptMacro )
type Event ¶
type Event struct { Type EventType Control ControlType Command string }
Event has information of inputed command and error etc..
func NewEventCommand ¶
make new InputEvent type EventCommand. cmd = "" means emitting command nothing.
func NewEventControl ¶
func NewEventControl(ctrl ControlType) Event
make new InputEvent type EventControl.
func NewEventRawInput ¶
make new input event type EventRawInput. it is intended for user key press, so accepts only one character or rune.
Click to show internal directories.
Click to hide internal directories.