Documentation ¶
Index ¶
- func CursorPosition() (x, y int)
- func DoEvents() error
- func ExecOnUIThread(f func())
- func GamepadAxis(id int, axis int) float64
- func GamepadAxisNum(id int) int
- func GamepadButtonNum(id int) int
- func Init()
- func IsClosed() bool
- func IsGamepadButtonPressed(id int, button GamepadButton) bool
- func IsKeyPressed(key Key) bool
- func IsMouseButtonPressed(button MouseButton) bool
- func Now() int64
- func SetScreenScale(scale int) (bool, int)
- func SetScreenSize(width, height int) (bool, int)
- func Start(width, height, scale int, title string) (actualScale int, err error)
- func SwapBuffers()
- func Terminate()
- type GamepadButton
- type Key
- type MouseButton
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CursorPosition ¶
func CursorPosition() (x, y int)
func ExecOnUIThread ¶ added in v1.2.0
func ExecOnUIThread(f func())
func GamepadAxis ¶ added in v1.2.0
func GamepadAxisNum ¶ added in v1.2.0
func GamepadButtonNum ¶ added in v1.2.0
func IsGamepadButtonPressed ¶ added in v1.2.0
func IsGamepadButtonPressed(id int, button GamepadButton) bool
func IsKeyPressed ¶
func IsMouseButtonPressed ¶
func IsMouseButtonPressed(button MouseButton) bool
func SetScreenScale ¶ added in v1.2.0
func SetScreenSize ¶ added in v1.2.0
func SwapBuffers ¶
func SwapBuffers()
Types ¶
type GamepadButton ¶ added in v1.2.0
type GamepadButton int
const ( GamepadButton0 GamepadButton = iota GamepadButton1 GamepadButton2 GamepadButton3 GamepadButton4 GamepadButton5 GamepadButton6 GamepadButton7 GamepadButton8 GamepadButton9 GamepadButton10 GamepadButton11 GamepadButton12 GamepadButton13 GamepadButton14 GamepadButton15 )
type Key ¶
type Key int
const ( Key0 Key = iota Key1 Key2 Key3 Key4 Key5 Key6 Key7 Key8 Key9 KeyA KeyB KeyC KeyD KeyE KeyF KeyG KeyH KeyI KeyJ KeyK KeyL KeyM KeyN KeyO KeyP KeyQ KeyR KeyS KeyT KeyU KeyV KeyW KeyX KeyY KeyZ KeyAlt KeyBackspace KeyCapsLock KeyComma KeyControl KeyDelete KeyDown KeyEnd KeyEnter KeyEscape KeyF1 KeyF2 KeyF3 KeyF4 KeyF5 KeyF6 KeyF7 KeyF8 KeyF9 KeyF10 KeyF11 KeyF12 KeyHome KeyInsert KeyLeft KeyPageDown KeyPageUp KeyPeriod KeyRight KeyShift KeySpace KeyTab KeyUp )
type MouseButton ¶
type MouseButton int
const ( MouseButtonLeft MouseButton = iota MouseButtonRight MouseButtonMiddle )
Click to show internal directories.
Click to hide internal directories.