Documentation ¶
Overview ¶
Package desktop manages the creation of windows and runs game states in thise windows. This will be the entry point for all games running on the desktop.
To start a game you have to create a window with a mode and pass it a game state:
func main() { mode := &desktop.Mode{Width: 1280, Height: 800, Fullscreen: false} window, err := desktop.OpenWindow(mode) if err != nil { panic(err) } window.Run(&game.State{ // define your callbacks here... }) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mode ¶
Mode represents the resolution of a window and whether it is fullscreen.
func FullscreenModes ¶
func FullscreenModes() []*Mode
FullscreenModes returns an array of all available fullscreen modes.
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window is the os application frame where all the stuff will happen.
func OpenWindow ¶
OpenWindow creates a new window on the main monitor.
Click to show internal directories.
Click to hide internal directories.