4 // Graphical User Interface support
12 enum { SBS_SHOWING, SBS_HIDING, SBS_SHOWN, SBS_HIDDEN };
20 // Everything else is a class method...
21 static void Init(SDL_Renderer *);
22 static SDL_Texture * CreateTexture(SDL_Renderer *, const void *);
23 static void MouseDown(int32_t, int32_t, uint32_t);
24 static void MouseUp(int32_t, int32_t, uint32_t);
25 static void MouseMove(int32_t, int32_t, uint32_t);
26 static bool KeyDown(uint32_t);
27 static void HandleIconSelection(SDL_Renderer *);
28 static void AssembleDriveIcon(SDL_Renderer *, int);
29 static void DrawEjectButton(SDL_Renderer *, int);
30 static void DrawNewDiskButton(SDL_Renderer *, int);
31 static void DrawDriveLight(SDL_Renderer *, int);
32 static void DrawCharArray(SDL_Renderer *, const char *, int x,
33 int y, int w, int h, int r, int g, int b);
34 static void DrawCharacter(SDL_Renderer *, int, int, uint8_t, bool inv = false);
35 static void DrawCharacterVert(SDL_Renderer *, int, int, uint8_t, bool inv = false);
36 static void DrawString(SDL_Renderer *, int, int, const char *, bool inv = false);
37 static void DrawStringVert(SDL_Renderer *, int, int, const char *, bool inv = false);
38 static void DrawBox(SDL_Renderer *, int, int, int, int, int r = 0x00, int g = 0xAA, int b = 0x00);
39 static void HandleGUIState(void);
40 static void DrawSidebarIcons(SDL_Renderer *);
41 static void Render(SDL_Renderer *);
44 static SDL_Texture * overlay;
45 static SDL_Rect olDst;
46 static int sidebarState;
48 static int32_t iconSelected;
49 static bool hasKeyboardFocus;
50 static bool powerOnState;
53 static SDL_Texture * charStamp;
54 static uint32_t stamp[];