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) 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) DeviceScaleFactor() float64
- func (u *UserInterface) Input() driver.Input
- func (u *UserInterface) IsCursorVisible() bool
- func (u *UserInterface) IsFullscreen() bool
- func (u *UserInterface) IsRunnableInBackground() bool
- func (u *UserInterface) IsVsyncEnabled() bool
- func (u *UserInterface) IsWindowDecorated() bool
- func (u *UserInterface) IsWindowResizable() bool
- func (u *UserInterface) Run(width, height int, scale float64, title string, context driver.UIContext, ...) error
- func (u *UserInterface) RunWithoutMainLoop(width, height int, scale float64, title string, context driver.UIContext, ...) <-chan error
- func (u *UserInterface) ScreenPadding() (x0, y0, x1, y1 float64)
- func (u *UserInterface) ScreenScale() float64
- func (u *UserInterface) ScreenSizeInFullscreen() (int, int)
- func (u *UserInterface) SetCursorVisible(visible bool)
- func (u *UserInterface) SetFullscreen(fullscreen bool)
- func (u *UserInterface) SetRunnableInBackground(runnableInBackground bool)
- func (u *UserInterface) SetScreenScale(scale float64)
- func (u *UserInterface) SetScreenSize(width, height int)
- func (u *UserInterface) SetVsyncEnabled(enabled bool)
- func (u *UserInterface) SetWindowDecorated(decorated bool)
- func (u *UserInterface) SetWindowIcon(iconImages []image.Image)
- func (u *UserInterface) SetWindowResizable(decorated bool)
- func (u *UserInterface) SetWindowTitle(title string)
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) 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) DeviceScaleFactor ¶
func (u *UserInterface) DeviceScaleFactor() float64
func (*UserInterface) Input ¶
func (u *UserInterface) Input() driver.Input
func (*UserInterface) IsCursorVisible ¶
func (u *UserInterface) IsCursorVisible() bool
func (*UserInterface) IsFullscreen ¶
func (u *UserInterface) IsFullscreen() bool
func (*UserInterface) IsRunnableInBackground ¶
func (u *UserInterface) IsRunnableInBackground() bool
func (*UserInterface) IsVsyncEnabled ¶
func (u *UserInterface) IsVsyncEnabled() bool
func (*UserInterface) IsWindowDecorated ¶
func (u *UserInterface) IsWindowDecorated() bool
func (*UserInterface) IsWindowResizable ¶
func (u *UserInterface) IsWindowResizable() bool
func (*UserInterface) RunWithoutMainLoop ¶
func (*UserInterface) ScreenPadding ¶
func (u *UserInterface) ScreenPadding() (x0, y0, x1, y1 float64)
func (*UserInterface) ScreenScale ¶
func (u *UserInterface) ScreenScale() float64
func (*UserInterface) ScreenSizeInFullscreen ¶
func (u *UserInterface) ScreenSizeInFullscreen() (int, int)
func (*UserInterface) SetCursorVisible ¶
func (u *UserInterface) SetCursorVisible(visible bool)
func (*UserInterface) SetFullscreen ¶
func (u *UserInterface) SetFullscreen(fullscreen bool)
func (*UserInterface) SetRunnableInBackground ¶
func (u *UserInterface) SetRunnableInBackground(runnableInBackground bool)
func (*UserInterface) SetScreenScale ¶
func (u *UserInterface) SetScreenScale(scale float64)
func (*UserInterface) SetScreenSize ¶
func (u *UserInterface) SetScreenSize(width, height int)
func (*UserInterface) SetVsyncEnabled ¶
func (u *UserInterface) SetVsyncEnabled(enabled bool)
func (*UserInterface) SetWindowDecorated ¶
func (u *UserInterface) SetWindowDecorated(decorated bool)
func (*UserInterface) SetWindowIcon ¶
func (u *UserInterface) SetWindowIcon(iconImages []image.Image)
func (*UserInterface) SetWindowResizable ¶
func (u *UserInterface) SetWindowResizable(decorated bool)
func (*UserInterface) SetWindowTitle ¶
func (u *UserInterface) SetWindowTitle(title string)
Click to show internal directories.
Click to hide internal directories.