Documentation ¶
Index ¶
- func IsCursorVisible() bool
- func IsFullscreen() bool
- func IsRunnableInBackground() bool
- func Run(width, height int, scale float64, title string, g GraphicsContext) error
- func RunMainThreadLoop(ch <-chan error) error
- func ScreenOffset() (float64, float64)
- func ScreenScale() float64
- func SetCursorVisible(visible bool)
- func SetFullscreen(fullscreen bool)
- func SetRunnableInBackground(runnableInBackground bool)
- func SetScreenScale(scale float64) bool
- func SetScreenSize(width, height int) bool
- func SetWindowIcon(iconImages []image.Image)
- type GamepadButton
- type GraphicsContext
- type Input
- func (i *Input) CursorPosition() (x, y int)
- func (i *Input) GamepadAxis(id int, axis int) float64
- func (i *Input) GamepadAxisNum(id int) int
- func (i *Input) GamepadButtonNum(id int) int
- func (i *Input) GamepadIDs() []int
- func (i *Input) IsGamepadButtonPressed(id int, button GamepadButton) bool
- func (i *Input) IsKeyPressed(key Key) bool
- func (i *Input) IsMouseButtonPressed(button MouseButton) bool
- func (i *Input) RuneBuffer() []rune
- func (in *Input) Touches() []Touch
- type Key
- type MouseButton
- type RegularTermination
- type Touch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCursorVisible ¶ added in v1.6.0
func IsCursorVisible() bool
func IsFullscreen ¶ added in v1.6.0
func IsFullscreen() bool
func IsRunnableInBackground ¶ added in v1.6.0
func IsRunnableInBackground() bool
func Run ¶ added in v1.4.0
func Run(width, height int, scale float64, title string, g GraphicsContext) error
func RunMainThreadLoop ¶ added in v1.4.0
func ScreenOffset ¶ added in v1.6.0
func ScreenScale ¶ added in v1.4.0
func ScreenScale() float64
func SetCursorVisible ¶ added in v1.6.0
func SetCursorVisible(visible bool)
func SetFullscreen ¶ added in v1.6.0
func SetFullscreen(fullscreen bool)
func SetRunnableInBackground ¶ added in v1.6.0
func SetRunnableInBackground(runnableInBackground bool)
func SetScreenScale ¶
func SetScreenSize ¶
func SetWindowIcon ¶ added in v1.6.0
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 GraphicsContext ¶ added in v1.4.0
type Input ¶ added in v1.3.0
type Input struct {
// contains filtered or unexported fields
}
func CurrentInput ¶ added in v1.3.0
func CurrentInput() *Input
func (*Input) CursorPosition ¶ added in v1.3.0
func (*Input) GamepadAxisNum ¶ added in v1.3.0
func (*Input) GamepadButtonNum ¶ added in v1.3.0
func (*Input) GamepadIDs ¶ added in v1.6.0
func (*Input) IsGamepadButtonPressed ¶ added in v1.3.0
func (i *Input) IsGamepadButtonPressed(id int, button GamepadButton) bool
func (*Input) IsKeyPressed ¶ added in v1.3.0
func (*Input) IsMouseButtonPressed ¶ added in v1.3.0
func (i *Input) IsMouseButtonPressed(button MouseButton) bool
func (*Input) RuneBuffer ¶ added in v1.6.0
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 KeyLeft KeyLeftBracket KeyMinus KeyPageDown KeyPageUp KeyPeriod KeyRight KeyRightBracket KeySemicolon KeyShift KeySlash KeySpace KeyTab KeyUp )
type MouseButton ¶
type MouseButton int
const ( MouseButtonLeft MouseButton = iota MouseButtonRight MouseButtonMiddle )
type RegularTermination ¶ added in v1.4.0
type RegularTermination struct { }
func (*RegularTermination) Error ¶ added in v1.4.0
func (*RegularTermination) Error() string
Click to show internal directories.
Click to hide internal directories.