Refactor the game event loop and add menus to the Linux build

Patch from @x-qq
Addresses #195
This commit is contained in:
2020-01-25 17:57:32 -05:00
parent 1fcbd8e922
commit 29ef8b9c1e
17 changed files with 600 additions and 155 deletions

View File

@@ -22,6 +22,12 @@ void menu_activate();
void hideMenuBar();
void showMenuBar();
// If a menubar runs inside our own event loop, we need ways to supply it with events and to draw it.
namespace sf { class Event; };
// Return true if event has been consumed by the menubar.
bool menuBarProcessEvent(const sf::Event&);
void drawMenuBar();
enum class eMenu {
NONE, ABOUT, PREFS, QUIT,
FILE_NEW, FILE_OPEN, FILE_ABORT, FILE_SAVE, FILE_SAVE_AS,