input

package
v0.12.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2022 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventLoopStart

func EventLoopStart()

func GetMouseMotion

func GetMouseMotion() (xDelta, yDelta int32)

GetMouseMotion returns how many pixels were moved last frame

func GetMouseMotionNorm

func GetMouseMotionNorm() (xDelta, yDelta int32)

func GetMousePos

func GetMousePos() (x, y int32)

GetMousePos returns the window coordinates of the mouse

func GetMouseWheelMotion

func GetMouseWheelMotion() (xDelta, yDelta int32)

func GetMouseWheelXNorm

func GetMouseWheelXNorm() int32

GetMouseWheelXNorm returns 1 if mouse wheel xDelta > 0, -1 if xDelta < 0, and 0 otherwise

func GetMouseWheelYNorm

func GetMouseWheelYNorm() int32

returns 1 if mouse wheel yDelta > 0, -1 if yDelta < 0, and 0 otherwise

func HandleKeyboardEvent

func HandleKeyboardEvent(e *sdl.KeyboardEvent)

func HandleMouseBtnEvent

func HandleMouseBtnEvent(e *sdl.MouseButtonEvent)

func HandleMouseMotionEvent

func HandleMouseMotionEvent(e *sdl.MouseMotionEvent)

func HandleMouseWheelEvent

func HandleMouseWheelEvent(e *sdl.MouseWheelEvent)

func HandleQuitEvent added in v0.0.6

func HandleQuitEvent(e *sdl.QuitEvent)

func IsQuitClicked added in v0.0.6

func IsQuitClicked() bool

func KeyClicked

func KeyClicked(kc sdl.Keycode) bool

func KeyDown

func KeyDown(kc sdl.Keycode) bool

func KeyReleased

func KeyReleased(kc sdl.Keycode) bool

func KeyUp

func KeyUp(kc sdl.Keycode) bool

func MouseClicked

func MouseClicked(mb int) bool

func MouseDoubleClicked

func MouseDoubleClicked(mb int) bool

func MouseDown

func MouseDown(mb int) bool

func MouseReleased

func MouseReleased(mb int) bool

func MouseUp

func MouseUp(mb int) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL