Versions in this module Expand all Collapse all v0 v0.2.2 Jan 10, 2021 Changes in this version type Renderer + func (r *Renderer) GetStringDimension(message string) (int, int) v0.2.1 Jan 9, 2021 v0.2.0 Jan 9, 2021 Changes in this version type RenderWindow + func (w *RenderWindow) AllowHighDPI() type Renderer + func (r *Renderer) GetSize() (int, int) + func (r *Renderer) Text(message string, x, y int) (int, int) + func (r *Renderer) UncachedText(message string, x, y int) (int, int) v0.1.0 May 24, 2018 Changes in this version + const KEY_0 + const KEY_1 + const KEY_2 + const KEY_3 + const KEY_4 + const KEY_5 + const KEY_6 + const KEY_7 + const KEY_8 + const KEY_9 + const KEY_A + const KEY_AC_BACK + const KEY_AC_BOOKMARKS + const KEY_AC_FORWARD + const KEY_AC_HOME + const KEY_AC_REFRESH + const KEY_AC_SEARCH + const KEY_AC_STOP + const KEY_AGAIN + const KEY_ALTERASE + const KEY_AMPERSAND + const KEY_APPLICATION + const KEY_ASTERISK + const KEY_AT + const KEY_AUDIOMUTE + const KEY_AUDIONEXT + const KEY_AUDIOPLAY + const KEY_AUDIOPREV + const KEY_AUDIOSTOP + const KEY_B + const KEY_BACKQUOTE + const KEY_BACKSLASH + const KEY_BACKSPACE + const KEY_BRIGHTNESSDOWN + const KEY_BRIGHTNESSUP + const KEY_C + const KEY_CALCULATOR + const KEY_CANCEL + const KEY_CAPSLOCK + const KEY_CARET + const KEY_CLEAR + const KEY_CLEARAGAIN + const KEY_COLON + const KEY_COMMA + const KEY_COMPUTER + const KEY_COPY + const KEY_CRSEL + const KEY_CURRENCYSUBUNIT + const KEY_CURRENCYUNIT + const KEY_CUT + const KEY_D + const KEY_DECIMALSEPARATOR + const KEY_DELETE + const KEY_DISPLAYSWITCH + const KEY_DOLLAR + const KEY_DOWN + const KEY_E + const KEY_EJECT + const KEY_END + const KEY_EQUALS + const KEY_ESCAPE + const KEY_EXCLAIM + const KEY_EXECUTE + const KEY_EXSEL + const KEY_F + const KEY_F1 + const KEY_F10 + const KEY_F11 + const KEY_F12 + const KEY_F13 + const KEY_F14 + const KEY_F15 + const KEY_F16 + const KEY_F17 + const KEY_F18 + const KEY_F19 + const KEY_F2 + const KEY_F20 + const KEY_F21 + const KEY_F22 + const KEY_F23 + const KEY_F24 + const KEY_F3 + const KEY_F4 + const KEY_F5 + const KEY_F6 + const KEY_F7 + const KEY_F8 + const KEY_F9 + const KEY_FIND + const KEY_G + const KEY_GREATER + const KEY_H + const KEY_HASH + const KEY_HELP + const KEY_HOME + const KEY_I + const KEY_INSERT + const KEY_J + const KEY_K + const KEY_KBDILLUMDOWN + const KEY_KBDILLUMTOGGLE + const KEY_KBDILLUMUP + const KEY_KP_0 + const KEY_KP_00 + const KEY_KP_000 + const KEY_KP_1 + const KEY_KP_2 + const KEY_KP_3 + const KEY_KP_4 + const KEY_KP_5 + const KEY_KP_6 + const KEY_KP_7 + const KEY_KP_8 + const KEY_KP_9 + const KEY_KP_A + const KEY_KP_AMPERSAND + const KEY_KP_AT + const KEY_KP_B + const KEY_KP_BACKSPACE + const KEY_KP_BINARY + const KEY_KP_C + const KEY_KP_CLEAR + const KEY_KP_CLEARENTRY + const KEY_KP_COLON + const KEY_KP_COMMA + const KEY_KP_D + const KEY_KP_DBLAMPERSAND + const KEY_KP_DBLVERTICALBAR + const KEY_KP_DECIMAL + const KEY_KP_DIVIDE + const KEY_KP_E + const KEY_KP_ENTER + const KEY_KP_EQUALS + const KEY_KP_EQUALSAS400 + const KEY_KP_EXCLAM + const KEY_KP_F + const KEY_KP_GREATER + const KEY_KP_HASH + const KEY_KP_HEXADECIMAL + const KEY_KP_LEFTBRACE + const KEY_KP_LEFTPAREN + const KEY_KP_LESS + const KEY_KP_MEMADD + const KEY_KP_MEMCLEAR + const KEY_KP_MEMDIVIDE + const KEY_KP_MEMMULTIPLY + const KEY_KP_MEMRECALL + const KEY_KP_MEMSTORE + const KEY_KP_MEMSUBTRACT + const KEY_KP_MINUS + const KEY_KP_MULTIPLY + const KEY_KP_OCTAL + const KEY_KP_PERCENT + const KEY_KP_PERIOD + const KEY_KP_PLUS + const KEY_KP_PLUSMINUS + const KEY_KP_POWER + const KEY_KP_RIGHTBRACE + const KEY_KP_RIGHTPAREN + const KEY_KP_SPACE + const KEY_KP_TAB + const KEY_KP_VERTICALBAR + const KEY_KP_XOR + const KEY_L + const KEY_LALT + const KEY_LCTRL + const KEY_LEFT + const KEY_LEFTBRACKET + const KEY_LEFTPAREN + const KEY_LESS + const KEY_LGUI + const KEY_LSHIFT + const KEY_M + const KEY_MAIL + const KEY_MEDIASELECT + const KEY_MENU + const KEY_MINUS + const KEY_MODE + const KEY_MUTE + const KEY_N + const KEY_NUMLOCKCLEAR + const KEY_O + const KEY_OPER + const KEY_OUT + const KEY_P + const KEY_PAGEDOWN + const KEY_PAGEUP + const KEY_PASTE + const KEY_PAUSE + const KEY_PERCENT + const KEY_PERIOD + const KEY_PLUS + const KEY_POWER + const KEY_PRINTSCREEN + const KEY_PRIOR + const KEY_Q + const KEY_QUESTION + const KEY_QUOTE + const KEY_QUOTEDBL + const KEY_R + const KEY_RALT + const KEY_RCTRL + const KEY_RETURN + const KEY_RETURN2 + const KEY_RGUI + const KEY_RIGHT + const KEY_RIGHTBRACKET + const KEY_RIGHTPAREN + const KEY_RSHIFT + const KEY_S + const KEY_SCROLLLOCK + const KEY_SELECT + const KEY_SEMICOLON + const KEY_SEPARATOR + const KEY_SLASH + const KEY_SLEEP + const KEY_SPACE + const KEY_STOP + const KEY_SYSREQ + const KEY_T + const KEY_TAB + const KEY_THOUSANDSSEPARATOR + const KEY_U + const KEY_UNDERSCORE + const KEY_UNDO + const KEY_UP + const KEY_V + const KEY_VOLUMEDOWN + const KEY_VOLUMEUP + const KEY_W + const KEY_WWW + const KEY_X + const KEY_Y + const KEY_Z + const UNKNOWN + var Black = RGB(0, 0, 0) + var Blue = RGB(0, 0, 255) + var Green = RGB(0, 255, 0) + var Red = RGB(255, 0, 0) + var White *Color = RGB(255, 255, 255) + func CurrentTimeMillis() int64 + func EnableDPI() + func GetDisplayDPI(displayIndex int) (float32, float32) + func HandleEvent(event StrifeEvent) + func KeyPressed(keyCode int) bool + func KeyState() []uint8 + func MouseCoords() []int + func PollKeys() bool + func PopKey() int + type BaseEvent struct + func (b *BaseEvent) GetTimestamp() uint32 + func (b *BaseEvent) GetType() uint32 + func (b *BaseEvent) Trigger() + type CloseEvent struct + type Color struct + A uint8 + B uint8 + G uint8 + R uint8 + func HexRGB(col uint32) *Color + func RGB(r, g, b int) *Color + func RGBA(r, g, b, a int) *Color + func (c *Color) Equals(o *Color) bool + func (c Color) AsHex() uint32 + func (c Color) ToSDLColor() sdl.Color + type Focus int + const FocusGained + const FocusLost + type Font struct + func LoadFont(path string, size int) (*Font, error) + func (f *Font) Destroy() + func (r *Font) DeriveFont(size int) (*Font, error) + type Image struct + Height int + Width int + func LoadImage(path string) (*Image, error) + func (i *Image) Destroy() + func (i *Image) GetSurface() *sdl.Surface + type KeyDownEvent struct + KeyCode int + type KeyUpEvent struct + KeyCode int + type KeyboardHandler struct + type MouseButtonState int + const LeftMouseButton + const NoMouseButtonsDown + const RightMouseButton + const ScrollWheel + func MouseButtonsState() MouseButtonState + type MouseHandler struct + ButtonState MouseButtonState + X int + Y int + type MouseMoveEvent struct + X int + Y int + type MouseWheelEvent struct + X int + Y int + type RenderConfig struct + Accelerated bool + Alias bool + VerticalSync bool + func DefaultConfig() *RenderConfig + func GoGoStrifeFast() *RenderConfig + type RenderWindow struct + func SetupRenderWindow(w, h int, config *RenderConfig) *RenderWindow + func (w *RenderWindow) Close() + func (w *RenderWindow) CloseRequested() bool + func (w *RenderWindow) Create() error + func (w *RenderWindow) GetRenderContext() *Renderer + func (w *RenderWindow) GetSize() (int, int) + func (w *RenderWindow) HandleEvents(handler func(StrifeEvent)) + func (w *RenderWindow) PollEvents() + func (w *RenderWindow) SetIconImage(img *Image) + func (w *RenderWindow) SetResizable(resizable bool) + type Renderer struct + var RenderInstance *Renderer + func CreateRenderer(parent *RenderWindow, config *RenderConfig) (*Renderer, error) + func (r *Renderer) Clear() + func (r *Renderer) Display() + func (r *Renderer) GetFont() *Font + func (r *Renderer) Image(image *Image, x, y int) + func (r *Renderer) ImageScale(image *Image, x, y, w, h int) + func (r *Renderer) Rect(x, y, w, h int, mode Style) + func (r *Renderer) SetColor(col *Color) + func (r *Renderer) SetFont(font *Font) + func (r *Renderer) String(message string, x, y int) (int, int) + func (r *Renderer) SubImage(image *Image, x, y int, tx, ty, tw, th int) + func (r *Renderer) SubImageScale(image *Image, x, y int, tx, ty, tw, th int, sw, sh int) + func (r *Renderer) UncachedString(message string, x, y int) (int, int) + type StrifeEvent interface + Trigger func() + type Style uint + const Fill + const Line + type Visibility int + const Exposed + const Hidden + const Shown + type WindowFocusEvent struct + type WindowMoveEvent struct + X int + Y int + type WindowResizeEvent struct + Height int + Width int + type WindowVisibilityEvent struct