Versions in this module Expand all Collapse all v0 v0.3.2 Sep 2, 2020 Changes in this version type SDL2 + func (s *SDL2) DisableCursor() error + func (s *SDL2) EnableCursor() error v0.3.1 Aug 27, 2020 Changes in this version type Mouse + func (m *Mouse) Pos() (int32, int32) v0.3.0 Aug 26, 2020 Changes in this version + type Mouse struct + X int32 + Y int32 + func (m *Mouse) IsButtonDown(button input.MouseButton) bool + func (m *Mouse) IsButtonPress(button input.MouseButton) bool + func (m *Mouse) IsButtonRelease(button input.MouseButton) bool + func (m *Mouse) IsButtonUp(button input.MouseButton) bool + func (m *Mouse) IsClick(button input.MouseButton) (bool, int32, int32) + func (m *Mouse) IsRelease(button input.MouseButton) (bool, int32, int32) + func (m *Mouse) UpdateButton(button input.MouseButton, x, y int32, pressed bool) + func (m *Mouse) UpdatePosition(x, y int32) type SDL2 + func (s *SDL2) NewMouse() input.Mouse v0.2.0 Aug 19, 2020 Changes in this version type Font + func (f *Font) SetFont(fontPath string, size int) error + func (f *Font) Texture(text string, color graphics.Color) (graphics.Texture, error) v0.1.2 Aug 18, 2020 Changes in this version + type Camera struct + func (c *Camera) ScaleX() float32 + func (c *Camera) ScaleY() float32 + func (c *Camera) SetPosition(x, y int32) + func (c *Camera) SetScale(x, y float32) + func (c *Camera) X() int32 + func (c *Camera) Y() int32 type SDL2 + func (s *SDL2) NewCamera() (graphics.Camera, error) + func (s *SDL2) NewTextureAtlas(imgPath string, splitX, splitY int32) (graphics.TextureAtlas, error) + type TextureAtlas struct + func (t *TextureAtlas) Close() error + func (t *TextureAtlas) Draw(tile int, x, y int32, scaleX, scaleY float32) error + func (t *TextureAtlas) Len() int v0.1.1 Aug 17, 2020 Changes in this version type SDL2 + func (s *SDL2) NewTextureAtlus(imgPath string, splitX, splitY int32) (graphics.TextureAtlus, error) + type TextureAtlus struct + func (t *TextureAtlus) Close() error + func (t *TextureAtlus) Draw(tile int, x, y int32, scaleX, scaleY float32) error + func (t *TextureAtlus) Len() int v0.1.0 Aug 14, 2020 Changes in this version + type Font struct + func (f *Font) Close() error + func (f *Font) Draw(text string, x, y int32, color graphics.Color) error + type Keyboard struct + func (k *Keyboard) IsKeyDown(keyCode input.Key) bool + func (k *Keyboard) IsKeyPress(keyCode input.Key) bool + func (k *Keyboard) IsKeyRelease(keyCode input.Key) bool + func (k *Keyboard) IsKeyUp(keyCode input.Key) bool + func (k *Keyboard) UpdateKey(keyCode input.Key, pressed, repeat bool) + type Player struct + func (p *Player) Close() error + func (p *Player) NewSound(soundPath string) (audio.Sound, error) + func (p *Player) SetVolume(volume float32) error + type SDL2 struct + func (s *SDL2) Close() + func (s *SDL2) CreateWindow(x, y int32, title string) error + func (s *SDL2) Init() error + func (s *SDL2) NewAudioPlayer() (audio.Player, error) + func (s *SDL2) NewFont(fontPath string, size int) (graphics.Font, error) + func (s *SDL2) NewKeyboard() input.Keyboard + func (s *SDL2) NewTexture(imgPath string) (graphics.Texture, error) + func (s *SDL2) PostDraw() + func (s *SDL2) PreDraw() error + func (s *SDL2) SetBackgroundColor(color *graphics.Color) + func (s *SDL2) Update() error + type Sound struct + func (s *Sound) Close() error + func (s *Sound) Play() error + type Texture struct + func (t *Texture) Close() error + func (t *Texture) Draw(x, y int32, scaleX, scaleY float32) error + func (t *Texture) H() int32 + func (t *Texture) W() int32