Documentation ¶
Index ¶
- func Init() (*opengl.Context, error)
- func Now() int64
- type GamepadButton
- 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) IsGamepadButtonPressed(id int, button GamepadButton) bool
- func (i *Input) IsKeyPressed(key Key) bool
- func (i *Input) IsMouseButtonPressed(button MouseButton) bool
- type Key
- type MouseButton
- type UserInterface
- func (u *UserInterface) ActualScreenScale() int
- func (u *UserInterface) DoEvents() error
- func (u *UserInterface) IsClosed() bool
- func (u *UserInterface) ScreenScale() int
- func (u *UserInterface) SetScreenScale(scale int) bool
- func (u *UserInterface) SetScreenSize(width, height int) bool
- func (u *UserInterface) Start(width, height, scale int, title string) error
- func (u *UserInterface) SwapBuffers()
- func (u *UserInterface) Terminate()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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) 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
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 )
type UserInterface ¶ added in v1.3.0
type UserInterface struct {
// contains filtered or unexported fields
}
func CurrentUI ¶ added in v1.3.0
func CurrentUI() *UserInterface
func (*UserInterface) ActualScreenScale ¶ added in v1.3.0
func (u *UserInterface) ActualScreenScale() int
func (*UserInterface) DoEvents ¶ added in v1.3.0
func (u *UserInterface) DoEvents() error
func (*UserInterface) IsClosed ¶ added in v1.3.0
func (u *UserInterface) IsClosed() bool
func (*UserInterface) ScreenScale ¶ added in v1.3.0
func (u *UserInterface) ScreenScale() int
func (*UserInterface) SetScreenScale ¶ added in v1.3.0
func (u *UserInterface) SetScreenScale(scale int) bool
func (*UserInterface) SetScreenSize ¶ added in v1.3.0
func (u *UserInterface) SetScreenSize(width, height int) bool
func (*UserInterface) Start ¶ added in v1.3.0
func (u *UserInterface) Start(width, height, scale int, title string) error
func (*UserInterface) SwapBuffers ¶ added in v1.3.0
func (u *UserInterface) SwapBuffers()
func (*UserInterface) Terminate ¶ added in v1.3.0
func (u *UserInterface) Terminate()
Click to show internal directories.
Click to hide internal directories.