4 // Graphical User Interface support
13 class Menu; // Now *this* should work, since we've got pointers...
23 void AddMenuTitle(const char *);
24 void AddMenuItem(const char *, Element * (* a)(void) = NULL, SDL_Scancode k = SDL_SCANCODE_UNKNOWN);
25 void CommitItemsToMenu(void);
32 std::list<Element *> windowList;
35 SDL_Rect mouse, oldMouse;
45 // Everything else is a class method...
46 static void Init(SDL_Renderer *);
47 static SDL_Texture * CreateTexture(SDL_Renderer *, const void *);
48 static void MouseDown(int32_t, int32_t, uint32_t);
49 static void MouseUp(int32_t, int32_t, uint32_t);
50 static void MouseMove(int32_t, int32_t, uint32_t);
51 static void HandleIconSelection(SDL_Renderer *);
52 static void AssembleDriveIcon(SDL_Renderer *, int);
53 static void DrawEjectButton(SDL_Renderer *, int);
54 static void DrawDriveLight(SDL_Renderer *, int);
55 static void DrawCharArray(SDL_Renderer *, const char *, int x,
56 int y, int w, int h, int r, int g, int b);
57 static void HandleGUIState(void);
58 static void DrawSidebarIcons(SDL_Renderer *);
59 static void Render(SDL_Renderer *);
62 static SDL_Texture * overlay;
63 static SDL_Rect olDst;
64 static int sidebarState;
66 static int32_t iconSelected;
67 static bool hasKeyboardFocus;