Documentation ¶
Index ¶
- Variables
- func DrawCenteredText(dst draw.Image, dx, dy int, text string, c color.Color)
- func DrawCharacter(dst draw.Image, x, y int, ch byte, c color.Color)
- func DrawText(dst draw.Image, x, y int, text string, c color.Color)
- func GetCursorPosInWindow(window *glfw.Window) (float64, float64)
- func GetWindow() *glfw.Window
- func HashFile(path string) (string, error)
- func HomeDir() string
- func IsMouseKeyHold(window *glfw.Window, button glfw.MouseButton) bool
- func ReadKey(window *glfw.Window, key glfw.Key) bool
- func Run(customView CustomViewIF)
- func Screenshot(directory string, im image.Image)
- func SetWindow(_width, _height, _scale int)
- func WordWrap(text string, maxLength int) []string
- type Audio
- type CustomViewIF
- type Director
- type GameView
- type View
Constants ¶
This section is empty.
Variables ¶
View Source
var FONT_SIZE int = 16 / font_scale
Functions ¶
func DrawCenteredText ¶
func IsMouseKeyHold ¶
func IsMouseKeyHold(window *glfw.Window, button glfw.MouseButton) bool
glfw.MouseButtonLeft glfw.MouseButtonRight glfw.MouseButtonMiddle
func Run ¶
func Run(customView CustomViewIF)
func Screenshot ¶
Types ¶
type Audio ¶
type Audio struct {
// contains filtered or unexported fields
}
func (*Audio) GetAudioChannel ¶
func (*Audio) GetSampleRate ¶
type CustomViewIF ¶
type Director ¶
type Director struct {
// contains filtered or unexported fields
}
func (*Director) PlayGame ¶
func (d *Director) PlayGame(customView CustomViewIF)
func (*Director) Start ¶
func (d *Director) Start(customView CustomViewIF)
type View ¶
type View interface { Enter() Exit() Update(t, dt float64) }
func NewGameView ¶
func NewGameView(director *Director, customView CustomViewIF) View
Click to show internal directories.
Click to hide internal directories.