Documentation ¶
Index ¶
- func CreateWindow(width, height int, name string, fullscreen bool, delegate WindowDelegate, ...) error
- func WindowAspectRatio(window *glfw.Window) float64
- type DoSimulation
- type GameTime
- type IdleSimulatorWindowDelegator
- func (wd *IdleSimulatorWindowDelegator) KeyPress(window *glfw.Window, k glfw.Key, s int, action glfw.Action, ...)
- func (wd *IdleSimulatorWindowDelegator) MouseClick(window *glfw.Window, button glfw.MouseButton, action glfw.Action, ...)
- func (wd *IdleSimulatorWindowDelegator) MouseMove(window *glfw.Window, xpos float64, ypos float64)
- func (wd *IdleSimulatorWindowDelegator) Scroll(window *glfw.Window, xoff float64, yoff float64)
- type WindowDelegate
- type WindowDelegator
- func (wd *WindowDelegator) Draw(window *glfw.Window)
- func (wd *WindowDelegator) Init(window *glfw.Window)
- func (wd *WindowDelegator) IsIdle() bool
- func (wd *WindowDelegator) KeyPress(window *glfw.Window, k glfw.Key, s int, action glfw.Action, ...)
- func (wd *WindowDelegator) MouseClick(window *glfw.Window, button glfw.MouseButton, action glfw.Action, ...)
- func (wd *WindowDelegator) MouseMove(window *glfw.Window, xpos float64, ypos float64)
- func (wd *WindowDelegator) NeedsRender() bool
- func (wd *WindowDelegator) OnClose(window *glfw.Window)
- func (wd *WindowDelegator) Reshape(window *glfw.Window, width, height int)
- func (wd *WindowDelegator) Scroll(window *glfw.Window, xoff float64, yoff float64)
- func (wd *WindowDelegator) Simulate(time GameTime)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWindow ¶
func WindowAspectRatio ¶
Types ¶
type DoSimulation ¶
type DoSimulation func()
type IdleSimulatorWindowDelegator ¶
type IdleSimulatorWindowDelegator struct { WindowDelegator DoSimulate DoSimulation }
func (*IdleSimulatorWindowDelegator) KeyPress ¶
func (wd *IdleSimulatorWindowDelegator) KeyPress(window *glfw.Window, k glfw.Key, s int, action glfw.Action, mods glfw.ModifierKey)
func (*IdleSimulatorWindowDelegator) MouseClick ¶
func (wd *IdleSimulatorWindowDelegator) MouseClick(window *glfw.Window, button glfw.MouseButton, action glfw.Action, mod glfw.ModifierKey)
type WindowDelegate ¶
type WindowDelegate interface { Init(window *glfw.Window) Draw(window *glfw.Window) Reshape(window *glfw.Window, width, height int) MouseClick(window *glfw.Window, button glfw.MouseButton, action glfw.Action, mod glfw.ModifierKey) MouseMove(window *glfw.Window, xpos float64, ypos float64) KeyPress(window *glfw.Window, k glfw.Key, s int, action glfw.Action, mods glfw.ModifierKey) Scroll(window *glfw.Window, xoff float64, yoff float64) Simulate(time GameTime) OnClose(window *glfw.Window) IsIdle() bool NeedsRender() bool }
type WindowDelegator ¶
type WindowDelegator struct {
Delegate WindowDelegate
}
func (*WindowDelegator) Draw ¶
func (wd *WindowDelegator) Draw(window *glfw.Window)
func (*WindowDelegator) Init ¶
func (wd *WindowDelegator) Init(window *glfw.Window)
func (*WindowDelegator) IsIdle ¶
func (wd *WindowDelegator) IsIdle() bool
func (*WindowDelegator) KeyPress ¶
func (wd *WindowDelegator) KeyPress(window *glfw.Window, k glfw.Key, s int, action glfw.Action, mods glfw.ModifierKey)
func (*WindowDelegator) MouseClick ¶
func (wd *WindowDelegator) MouseClick(window *glfw.Window, button glfw.MouseButton, action glfw.Action, mod glfw.ModifierKey)
func (*WindowDelegator) MouseMove ¶
func (wd *WindowDelegator) MouseMove(window *glfw.Window, xpos float64, ypos float64)
func (*WindowDelegator) NeedsRender ¶
func (wd *WindowDelegator) NeedsRender() bool
func (*WindowDelegator) OnClose ¶
func (wd *WindowDelegator) OnClose(window *glfw.Window)
func (*WindowDelegator) Reshape ¶
func (wd *WindowDelegator) Reshape(window *glfw.Window, width, height int)
func (*WindowDelegator) Scroll ¶
func (wd *WindowDelegator) Scroll(window *glfw.Window, xoff float64, yoff float64)
func (*WindowDelegator) Simulate ¶
func (wd *WindowDelegator) Simulate(time GameTime)
Click to show internal directories.
Click to hide internal directories.