input

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GamepadButton

type GamepadButton int
const (
	GamepadButton0 GamepadButton = iota
	GamepadButton1
	GamepadButton2
	GamepadButton3
	GamepadButton4
	GamepadButton5
	GamepadButton6
	GamepadButton7
	GamepadButton8
	GamepadButton9
	GamepadButton10
	GamepadButton11
	GamepadButton12
	GamepadButton13
	GamepadButton14
	GamepadButton15
	GamepadButton16
	GamepadButton17
	GamepadButton18
	GamepadButton19
	GamepadButton20
	GamepadButton21
	GamepadButton22
	GamepadButton23
	GamepadButton24
	GamepadButton25
	GamepadButton26
	GamepadButton27
	GamepadButton28
	GamepadButton29
	GamepadButton30
	GamepadButton31
)

type Input

type Input struct {
	// contains filtered or unexported fields
}

func Get

func Get() *Input

func (*Input) ClearRuneBuffer

func (i *Input) ClearRuneBuffer()

func (*Input) CursorPosition

func (i *Input) CursorPosition() (x, y int)

func (*Input) GamepadAxis

func (i *Input) GamepadAxis(id int, axis int) float64

func (*Input) GamepadAxisNum

func (i *Input) GamepadAxisNum(id int) int

func (*Input) GamepadButtonNum

func (i *Input) GamepadButtonNum(id int) int

func (*Input) GamepadIDs

func (i *Input) GamepadIDs() []int

func (*Input) IsGamepadButtonPressed

func (i *Input) IsGamepadButtonPressed(id int, button GamepadButton) bool

func (*Input) IsKeyPressed

func (i *Input) IsKeyPressed(key Key) bool

func (*Input) IsMouseButtonPressed

func (i *Input) IsMouseButtonPressed(button MouseButton) bool

func (*Input) ResetScrollValues added in v1.8.0

func (i *Input) ResetScrollValues()

func (*Input) RuneBuffer

func (i *Input) RuneBuffer() []rune

func (*Input) Touches

func (in *Input) Touches() []*Touch

func (*Input) Update

func (i *Input) Update(window *glfw.Window, scale float64)

func (*Input) Wheel added in v1.8.0

func (i *Input) Wheel() (xoff, yoff float64)

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
	KeyApostrophe
	KeyBackslash
	KeyBackspace
	KeyCapsLock
	KeyComma
	KeyControl
	KeyDelete
	KeyDown
	KeyEnd
	KeyEnter
	KeyEqual
	KeyEscape
	KeyF1
	KeyF2
	KeyF3
	KeyF4
	KeyF5
	KeyF6
	KeyF7
	KeyF8
	KeyF9
	KeyF10
	KeyF11
	KeyF12
	KeyGraveAccent
	KeyHome
	KeyInsert
	KeyKP0
	KeyKP1
	KeyKP2
	KeyKP3
	KeyKP4
	KeyKP5
	KeyKP6
	KeyKP7
	KeyKP8
	KeyKP9
	KeyKPAdd
	KeyKPDecimal
	KeyKPDivide
	KeyKPEnter
	KeyKPEqual
	KeyKPMultiply
	KeyKPSubtract
	KeyLeft
	KeyLeftBracket
	KeyMenu
	KeyMinus
	KeyNumLock
	KeyPageDown
	KeyPageUp
	KeyPause
	KeyPeriod
	KeyPrintScreen
	KeyRight
	KeyRightBracket
	KeyScrollLock
	KeySemicolon
	KeyShift
	KeySlash
	KeySpace
	KeyTab
	KeyUp
)

type MouseButton

type MouseButton int
const (
	MouseButtonLeft MouseButton = iota
	MouseButtonRight
	MouseButtonMiddle
)

type Touch

type Touch struct {
	// contains filtered or unexported fields
}

func NewTouch

func NewTouch(id int, x, y int) *Touch

func (*Touch) ID

func (t *Touch) ID() int

func (*Touch) Position

func (t *Touch) Position() (x, y int)

Jump to

Keyboard shortcuts

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