Documentation ¶
Index ¶
- func NewActionMap() controller.Controller
- type ActionMap
- func (am *ActionMap) BindAxisAction(function func(xpos, ypos float32))
- func (am *ActionMap) BindKeyAction(function func(), key controller.Key, action controller.Action)
- func (am *ActionMap) BindMouseAction(function func(), button controller.MouseButton, action controller.Action)
- func (am *ActionMap) BindScrollAction(function func(xoffset, yoffset float32))
- func (am *ActionMap) CursorPosCallback(window *glfw.Window, xpos, ypos float32)
- func (am *ActionMap) KeyCallback(window *glfw.Window, key glfw.Key, scancode int, action glfw.Action, ...)
- func (am *ActionMap) MouseButtonCallback(window *glfw.Window, button glfw.MouseButton, action glfw.Action, ...)
- func (am *ActionMap) ScrollCallback(window *glfw.Window, xoffset, yoffset float32)
- func (am *ActionMap) SetKeyAction(function func(key controller.Key, action controller.Action))
- func (am *ActionMap) SetMouseAction(function func(button controller.MouseButton, action controller.Action))
- type Controller
- type ControllerManager
- func (c *ControllerManager) AddController(newCont Controller)
- func (c *ControllerManager) CursorPosCallback(window *glfw.Window, xpos, ypos float64)
- func (c *ControllerManager) KeyCallback(window *glfw.Window, key glfw.Key, scancode int, action glfw.Action, ...)
- func (c *ControllerManager) MouseButtonCallback(window *glfw.Window, button glfw.MouseButton, action glfw.Action, ...)
- func (c *ControllerManager) RemoveController(controller Controller)
- func (c *ControllerManager) ScrollCallback(window *glfw.Window, xoffset, yoffset float64)
- type KeyAction
- type MouseButtonAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewActionMap ¶
func NewActionMap() controller.Controller
Types ¶
type ActionMap ¶
type ActionMap struct {
// contains filtered or unexported fields
}
func (*ActionMap) BindAxisAction ¶
func (*ActionMap) BindKeyAction ¶
func (am *ActionMap) BindKeyAction(function func(), key controller.Key, action controller.Action)
Bindings
func (*ActionMap) BindMouseAction ¶
func (am *ActionMap) BindMouseAction(function func(), button controller.MouseButton, action controller.Action)
func (*ActionMap) BindScrollAction ¶
func (*ActionMap) CursorPosCallback ¶
func (*ActionMap) KeyCallback ¶
func (am *ActionMap) KeyCallback(window *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey)
Callbacks
func (*ActionMap) MouseButtonCallback ¶
func (am *ActionMap) MouseButtonCallback(window *glfw.Window, button glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey)
func (*ActionMap) ScrollCallback ¶
func (*ActionMap) SetKeyAction ¶
func (am *ActionMap) SetKeyAction(function func(key controller.Key, action controller.Action))
func (*ActionMap) SetMouseAction ¶
func (am *ActionMap) SetMouseAction(function func(button controller.MouseButton, action controller.Action))
type Controller ¶
type Controller interface { controller.Controller KeyCallback(window *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey) MouseButtonCallback(window *glfw.Window, button glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey) CursorPosCallback(window *glfw.Window, xpos, ypos float32) ScrollCallback(window *glfw.Window, xoffset, yoffset float32) }
type ControllerManager ¶
type ControllerManager struct {
// contains filtered or unexported fields
}
func NewControllerManager ¶
func NewControllerManager(window *glfw.Window) *ControllerManager
func (*ControllerManager) AddController ¶
func (c *ControllerManager) AddController(newCont Controller)
func (*ControllerManager) CursorPosCallback ¶
func (c *ControllerManager) CursorPosCallback(window *glfw.Window, xpos, ypos float64)
Mouse movement callback
func (*ControllerManager) KeyCallback ¶
func (c *ControllerManager) KeyCallback(window *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey)
Key Callback
func (*ControllerManager) MouseButtonCallback ¶
func (c *ControllerManager) MouseButtonCallback(window *glfw.Window, button glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey)
Mouse click callback
func (*ControllerManager) RemoveController ¶
func (c *ControllerManager) RemoveController(controller Controller)
func (*ControllerManager) ScrollCallback ¶
func (c *ControllerManager) ScrollCallback(window *glfw.Window, xoffset, yoffset float64)
Mouse scrollwheel callback
type MouseButtonAction ¶
type MouseButtonAction struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.