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