Documentation
¶
Overview ¶
Package ebiteninput is the Ebiten input.Source: it reads keyboard, mouse, gamepads and touches through ebiten and inpututil into an input.Frame once per tick. It is the only part of the input system that imports Ebiten. game.Engine creates one; wire it by hand with input.NewRouter(ebiteninput.New(size), opts).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadGamepadMappings ¶
LoadGamepadMappings adds SDL controller mappings (the text of a gamecontrollerdb.txt) so more pads get the standard layout and pad: controls instead of padraw:. It wraps ebiten.UpdateStandardGamepadLayoutMappings.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source reads Ebiten's input. Create it with New; call its methods only from Ebiten's Update (the Router does). Polling allocates nothing in steady state: every list comes from an Append* call into a reused slice.
func New ¶
New returns a source. size reports the logical screen size (the values Layout returned), which touch regions are relative to; nil reports 0x0.
func (*Source) KeyName ¶
KeyName implements input.Source with ebiten.KeyName: the key's label on the current keyboard layout, where the platform reports it.