Documentation ¶
Index ¶
- func CreateGenericThumbnail(text string) image.Image
- func DrawCenteredText(dst draw.Image, text string, dx, dy int, 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 Run(paths []string)
- func WordWrap(text string, maxLength int) []string
- type Audio
- type BasicControllerAdapter
- type ControllerAdapter
- type Director
- func (d *Director) Console() *nes.Console
- func (d *Director) PlayGame(path string)
- func (d *Director) Run()
- func (d *Director) SetTitle(title string)
- func (d *Director) SetView(view View)
- func (d *Director) ShowMenu()
- func (d *Director) Start(paths []string)
- func (d *Director) Step()
- func (d *Director) Window() *glfw.Window
- type DummyControllerAdapter
- type GameView
- type KeyboardControllerAdapter
- type MenuView
- type Texture
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGenericThumbnail ¶
func DrawCenteredText ¶
Types ¶
type BasicControllerAdapter ¶
type BasicControllerAdapter struct {
// contains filtered or unexported fields
}
func (*BasicControllerAdapter) Buttons ¶
func (bca *BasicControllerAdapter) Buttons() [8]bool
func (*BasicControllerAdapter) SetWindow ¶
func (bca *BasicControllerAdapter) SetWindow(window *glfw.Window)
func (*BasicControllerAdapter) Trigger ¶
func (bca *BasicControllerAdapter) Trigger(button int, newState bool)
type ControllerAdapter ¶
type Director ¶
type Director struct {
// contains filtered or unexported fields
}
func NewDirector ¶
func NewDirector(window *glfw.Window, audio *Audio, ca1, ca2 ControllerAdapter) *Director
type DummyControllerAdapter ¶
type DummyControllerAdapter struct{}
func NewDummyControllerAdapter ¶
func NewDummyControllerAdapter() *DummyControllerAdapter
func (*DummyControllerAdapter) Buttons ¶
func (*DummyControllerAdapter) Buttons() [8]bool
func (*DummyControllerAdapter) SetWindow ¶
func (*DummyControllerAdapter) SetWindow(_ *glfw.Window)
func (*DummyControllerAdapter) Trigger ¶
func (*DummyControllerAdapter) Trigger(_ int, _ bool)
type KeyboardControllerAdapter ¶
type KeyboardControllerAdapter struct {
*BasicControllerAdapter
}
func NewKeyboardControllerAdapter ¶
func NewKeyboardControllerAdapter() *KeyboardControllerAdapter
func NewKeyboardControllerAdapterWithWindow ¶
func NewKeyboardControllerAdapterWithWindow(window *glfw.Window) *KeyboardControllerAdapter
func (*KeyboardControllerAdapter) Buttons ¶
func (kba *KeyboardControllerAdapter) Buttons() [8]bool
func (*KeyboardControllerAdapter) SetWindow ¶
func (kba *KeyboardControllerAdapter) SetWindow(window *glfw.Window)
func (*KeyboardControllerAdapter) Trigger ¶
func (kba *KeyboardControllerAdapter) Trigger(button int, newState bool)
type Texture ¶
type Texture struct {
// contains filtered or unexported fields
}
func NewTexture ¶
func NewTexture() *Texture
Click to show internal directories.
Click to hide internal directories.