Documentation ¶
Rendered for js/wasm
Index ¶
- 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) GamepadName(id int) string
- func (i *Input) GamepadSDLID(id int) string
- func (i *Input) IsGamepadButtonPressed(id int, button driver.GamepadButton) bool
- func (i *Input) IsKeyPressed(key driver.Key) bool
- func (i *Input) IsMouseButtonPressed(button driver.MouseButton) bool
- func (i *Input) ResetForFrame()
- func (i *Input) RuneBuffer() []rune
- func (i *Input) TouchIDs() []int
- func (i *Input) TouchPosition(id int) (x, y int)
- func (i *Input) Update(e js.Value)
- func (i *Input) UpdateGamepads()
- func (i *Input) Wheel() (xoff, yoff float64)
- type UserInterface
- func (u *UserInterface) CursorMode() driver.CursorMode
- func (u *UserInterface) DeviceScaleFactor() float64
- func (*UserInterface) Graphics() driver.Graphics
- func (u *UserInterface) Input() driver.Input
- func (u *UserInterface) IsFocused() bool
- func (u *UserInterface) IsFullscreen() bool
- func (u *UserInterface) IsRunnableOnUnfocused() bool
- func (u *UserInterface) IsScreenTransparent() bool
- func (u *UserInterface) IsVsyncEnabled() bool
- func (u *UserInterface) Run(context driver.UIContext) error
- func (u *UserInterface) RunWithoutMainLoop(context driver.UIContext)
- func (u *UserInterface) ScreenSizeInFullscreen() (int, int)
- func (u *UserInterface) SetCursorMode(mode driver.CursorMode)
- func (u *UserInterface) SetFullscreen(fullscreen bool)
- func (u *UserInterface) SetRunnableOnUnfocused(runnableOnUnfocused bool)
- func (u *UserInterface) SetScreenTransparent(transparent bool)
- func (u *UserInterface) SetVsyncEnabled(enabled bool)
- func (u *UserInterface) Window() driver.Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
func (*Input) CursorPosition ¶
func (*Input) GamepadAxisNum ¶
func (*Input) GamepadButtonNum ¶
func (*Input) GamepadIDs ¶
func (*Input) GamepadName ¶ added in v1.11.0
GamepadName returns a string containing some information about the controller. A PS2 controller returned "810-3-USB Gamepad" on Firefox A Xbox 360 controller returned "xinput" on Firefox and "Xbox 360 Controller (XInput STANDARD GAMEPAD)" on Chrome
func (*Input) GamepadSDLID ¶ added in v1.11.0
func (*Input) IsGamepadButtonPressed ¶
func (i *Input) IsGamepadButtonPressed(id int, button driver.GamepadButton) bool
func (*Input) IsMouseButtonPressed ¶
func (i *Input) IsMouseButtonPressed(button driver.MouseButton) bool
func (*Input) ResetForFrame ¶
func (i *Input) ResetForFrame()
func (*Input) RuneBuffer ¶
func (*Input) TouchPosition ¶
func (*Input) UpdateGamepads ¶
func (i *Input) UpdateGamepads()
type UserInterface ¶
type UserInterface struct {
// contains filtered or unexported fields
}
func Get ¶
func Get() *UserInterface
func (*UserInterface) CursorMode ¶ added in v1.11.0
func (u *UserInterface) CursorMode() driver.CursorMode
func (*UserInterface) DeviceScaleFactor ¶
func (u *UserInterface) DeviceScaleFactor() float64
func (*UserInterface) Graphics ¶ added in v1.11.0
func (*UserInterface) Graphics() driver.Graphics
func (*UserInterface) Input ¶
func (u *UserInterface) Input() driver.Input
func (*UserInterface) IsFocused ¶ added in v1.11.0
func (u *UserInterface) IsFocused() bool
func (*UserInterface) IsFullscreen ¶
func (u *UserInterface) IsFullscreen() bool
func (*UserInterface) IsRunnableOnUnfocused ¶ added in v1.11.0
func (u *UserInterface) IsRunnableOnUnfocused() bool
func (*UserInterface) IsScreenTransparent ¶ added in v1.11.0
func (u *UserInterface) IsScreenTransparent() bool
func (*UserInterface) IsVsyncEnabled ¶
func (u *UserInterface) IsVsyncEnabled() bool
func (*UserInterface) RunWithoutMainLoop ¶
func (u *UserInterface) RunWithoutMainLoop(context driver.UIContext)
func (*UserInterface) ScreenSizeInFullscreen ¶
func (u *UserInterface) ScreenSizeInFullscreen() (int, int)
func (*UserInterface) SetCursorMode ¶ added in v1.11.0
func (u *UserInterface) SetCursorMode(mode driver.CursorMode)
func (*UserInterface) SetFullscreen ¶
func (u *UserInterface) SetFullscreen(fullscreen bool)
func (*UserInterface) SetRunnableOnUnfocused ¶ added in v1.11.0
func (u *UserInterface) SetRunnableOnUnfocused(runnableOnUnfocused bool)
func (*UserInterface) SetScreenTransparent ¶ added in v1.11.0
func (u *UserInterface) SetScreenTransparent(transparent bool)
func (*UserInterface) SetVsyncEnabled ¶
func (u *UserInterface) SetVsyncEnabled(enabled bool)
func (*UserInterface) Window ¶ added in v1.11.0
func (u *UserInterface) Window() driver.Window
Click to show internal directories.
Click to hide internal directories.