Documentation ¶
Index ¶
- type Keyboard
- type Manager
- func (manager *Manager) KeyCallback(window *glfw.Window, key glfw.Key, scancode int, action glfw.Action, ...)
- func (manager *Manager) MouseCallback(window *glfw.Window, xpos float64, ypos float64)
- func (manager *Manager) PostUpdate()
- func (manager *Manager) Register()
- func (manager *Manager) Unregister()
- func (manager *Manager) Update(dt float64)
- type Mouse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keyboard ¶
type Keyboard struct {
// contains filtered or unexported fields
}
Keyboard key wrapper
func (*Keyboard) ReceiveMessage ¶
func (keyboard *Keyboard) ReceiveMessage(message tinygametools.Event)
CallbackMouseMove Event manager message receiver. Used to catch key events from the window library
func (*Keyboard) SendMessage ¶
type Manager ¶
type Manager struct { engine.Manager MouseCoordinates mgl64.Vec2 // contains filtered or unexported fields }
manager handles user input from mouse and keyboard in a specific window
func NewInputManager ¶
func NewInputManager(win *tinygametools.Window, mouse *tinygametools.Mouse, keyboard *tinygametools.Keyboard) *Manager
NewInputManager
func (*Manager) KeyCallback ¶
func (manager *Manager) KeyCallback(window *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey)
KeyCallback called whenever a key event occurs
func (*Manager) MouseCallback ¶
MouseCallback called whenever a mouse event occurs
func (*Manager) PostUpdate ¶
func (manager *Manager) PostUpdate()
type Mouse ¶
type Mouse struct {
// contains filtered or unexported fields
}
Mouse information, about change from previous poll. Note: Mouse is a struct containing mouse information, it doesn't have any direct interaction with the window
func (*Mouse) CallbackMouseMove ¶
func (mouse *Mouse) CallbackMouseMove(message tinygametools.Event)
CallbackMouseMove mouse receives updated info from the event queue about mouse interaction
func (*Mouse) GetCoordinates ¶
GetCoordinates return current mouse position
func (*Mouse) PostUpdate ¶
func (mouse *Mouse) PostUpdate()
func (*Mouse) SendMessage ¶
Click to show internal directories.
Click to hide internal directories.