Documentation ¶
Index ¶
- type EventsProvider
- type Gamepad
- type GamepadPress
- func (g *GamepadPress) AreGamepadButtonsCombined(button1, button2 ebiten.GamepadButton) bool
- func (g *GamepadPress) AreGamepadButtonsCombinedInOrder(m, s ebiten.GamepadButton) bool
- func (g *GamepadPress) AreGamepadButtonsCombinedOnce(button1, button2 ebiten.GamepadButton) bool
- func (g *GamepadPress) IsAnyButtonPressed() bool
- func (g *GamepadPress) IsGamepadButtonPressed(button ebiten.GamepadButton) bool
- func (g *GamepadPress) IsGamepadButtonPressedOnce(button ebiten.GamepadButton) bool
- func (g *GamepadPress) IsGamepadConnected() bool
- type IBuffer
- type Input
- type InputBuffers
- type KeyBoard
- type KeyBoardEntity
- type Mouse
- type MousePress
- type MouseWheel
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventsProvider ¶
type EventsProvider interface { Mouse() *Mouse Gamepad() *Gamepad Keyboard() *KeyBoard Input() *Input Window() *Window }
func UseEvents ¶
func UseEvents() EventsProvider
type GamepadPress ¶
type GamepadPress struct{}
func (*GamepadPress) AreGamepadButtonsCombined ¶
func (g *GamepadPress) AreGamepadButtonsCombined(button1, button2 ebiten.GamepadButton) bool
func (*GamepadPress) AreGamepadButtonsCombinedInOrder ¶
func (g *GamepadPress) AreGamepadButtonsCombinedInOrder(m, s ebiten.GamepadButton) bool
func (*GamepadPress) AreGamepadButtonsCombinedOnce ¶
func (g *GamepadPress) AreGamepadButtonsCombinedOnce(button1, button2 ebiten.GamepadButton) bool
func (*GamepadPress) IsAnyButtonPressed ¶
func (g *GamepadPress) IsAnyButtonPressed() bool
func (*GamepadPress) IsGamepadButtonPressed ¶
func (g *GamepadPress) IsGamepadButtonPressed(button ebiten.GamepadButton) bool
func (*GamepadPress) IsGamepadButtonPressedOnce ¶
func (g *GamepadPress) IsGamepadButtonPressedOnce(button ebiten.GamepadButton) bool
func (*GamepadPress) IsGamepadConnected ¶
func (g *GamepadPress) IsGamepadConnected() bool
Checks if any gamepad is connected
type IBuffer ¶
type InputBuffers ¶
type InputBuffers struct {
SettingsMenuNameBuffer, JoinGameBuffer IBuffer
}
func (*InputBuffers) CleanBuffersBlinking ¶
func (i *InputBuffers) CleanBuffersBlinking()
type KeyBoard ¶
type KeyBoard struct {
// contains filtered or unexported fields
}
func NewKeyBoard ¶
func NewKeyBoard() *KeyBoard
func (*KeyBoard) AreKeysCombinedInOrder ¶
func (*KeyBoard) CleanPressedKey ¶
func (*KeyBoard) HandleKeyPress ¶
func (k *KeyBoard) HandleKeyPress(b IBuffer, ke []KeyBoardEntity)
func (*KeyBoard) IsAnyKeyPressed ¶
Checks if any keyboard key pressed
func (*KeyBoard) IsKeyInList ¶
type KeyBoardEntity ¶
type KeyBoardEntity struct { //Describes single keys like "T", "A"... SingleKeys []ebiten.Key //Describes combined keys like: "CTRL+V" or "CTRL+C" Combination struct { AwaitKey []ebiten.Key ControlKey ebiten.Key } Pressed bool Callback func(IBuffer, rune) }
Keyboard entity which is used for key handler with further callback
type Mouse ¶
type Mouse struct { MousePress MouseWheel }
func (*Mouse) IsAnyMouseButtonsPressed ¶
func (*Mouse) IsAnyMovementButtonPressed ¶
type MousePress ¶
type MousePress struct{}
func (*MousePress) IsMousePressLeftOnce ¶
func (p *MousePress) IsMousePressLeftOnce(m sources.MetadataModel) bool
func (*MousePress) IsMousePressLeftOnceStatic ¶
func (p *MousePress) IsMousePressLeftOnceStatic(m sources.MetadataModel) bool
It checks collision with a static object, which won't change its size after window resizing
type MouseWheel ¶
type MouseWheel struct { IsMoved bool LastMouseWheelX, LastMouseWheelY float64 OffsetX, OffsetY float64 // contains filtered or unexported fields }
func (*MouseWheel) UpdateMouseWheelOffsets ¶
func (p *MouseWheel) UpdateMouseWheelOffsets()
Saves mouse wheel offsets using ebiten API or uses offsets gotten from gamepad
Click to show internal directories.
Click to hide internal directories.