Documentation ¶
Index ¶
- Constants
- type Console
- func (scr *Console) Clear() error
- func (scr Console) Height() int
- func (scr Console) NewScreen(w, h int) (Screen, error)
- func (scr *Console) Render() error
- func (scr *Console) SetKeyboardHandler(call func(int, bool))
- func (scr *Console) SetPixel(x, y int, color uint32) error
- func (scr Console) Width() int
- type DummyScreen
- func (scr *DummyScreen) Clear() error
- func (scr DummyScreen) Height() int
- func (scr DummyScreen) NewScreen(w, h int) (Screen, error)
- func (scr *DummyScreen) Render() error
- func (scr *DummyScreen) SetKeyboardHandler(call func(int, bool))
- func (scr *DummyScreen) SetPixel(x, y int, symbol uint32) error
- func (scr DummyScreen) Width() int
- type Screen
- type Sdl2
Constants ¶
View Source
const ( CL_NONE = 0 CL_GROUND = 0x484445 CL_SKY = 0x6C696A CL_BLACK = 0x2c3531 CL_WHITE = 0xF0F0F0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Console ¶
Console represents symbols screen buffer (where each pixel is symbol)
func (*Console) SetKeyboardHandler ¶
SetKeyboardHandler sets handler function for input listening
type DummyScreen ¶
type DummyScreen struct {
// contains filtered or unexported fields
}
DummyScreen with no functionality for debug purposes
func (DummyScreen) NewScreen ¶
func (scr DummyScreen) NewScreen(w, h int) (Screen, error)
NewScreen empty screen initializer with buffer of empty pixels
func (*DummyScreen) SetKeyboardHandler ¶
func (scr *DummyScreen) SetKeyboardHandler(call func(int, bool))
SetKeyboardHandler sets handler function for input listening
type Screen ¶
type Screen interface { NewScreen(w, h int) (Screen, error) SetPixel(x, y int, pixel uint32) error Render() error Clear() error Height() int Width() int SetKeyboardHandler(func(int, bool)) }
Screen represents screen buffer
type Sdl2 ¶
type Sdl2 struct {
// contains filtered or unexported fields
}
Sdl2 screen represents sdl2 window screen
func (*Sdl2) SetKeyboardHandler ¶
SetKeyboardHandler sets handler function for input listening
Click to show internal directories.
Click to hide internal directories.