diff options
Autocommit at 05.05.2022 @ 14:08
3 files changed, 22 insertions, 0 deletions
| -rw-r--r-- | src/ConsoleInterface/Menu.cpp | 6 | ||||
| -rw-r--r-- | src/ConsoleInterface/Menu.h | 3 | ||||
| -rw-r--r-- | src/VenueConsoleUI.cpp | 13 |
diff --git a/src/ConsoleInterface/Menu.cpp b/src/ConsoleInterface/Menu.cpp index 615b722..6b99deb 100644 --- a/src/ConsoleInterface/Menu.cpp +++ b/src/ConsoleInterface/Menu.cpp @@ -1,10 +1,16 @@ #include "Menu.h" #include "Toolbox.hpp" +Menu::Menu() : menuOptions() {} + Menu::Menu(const Command* commands, unsigned commandCount) { menuOptions = List<Command>(commands, commandCount); } +void Menu::addCommand(const Command* command) { + menuOptions.add(command); +} + void Menu::navigate() const { if (menuOptions.get_count() == 0) { printLine("Menu is empty!"); diff --git a/src/ConsoleInterface/Menu.h b/src/ConsoleInterface/Menu.h index f80636d..e81d77f 100644 --- a/src/ConsoleInterface/Menu.h +++ b/src/ConsoleInterface/Menu.h @@ -8,7 +8,10 @@ class Menu { List<Command> menuOptions; public: + Menu(); Menu(const Command* commands, unsigned commandCount); + + void addCommand(const Command* command); void navigate() const; }; diff --git a/src/VenueConsoleUI.cpp b/src/VenueConsoleUI.cpp index 6cdeb31..a4f63db 100644 --- a/src/VenueConsoleUI.cpp +++ b/src/VenueConsoleUI.cpp @@ -32,6 +32,19 @@ void command_newEvent() { handleStatusCode(v.get_es().createEvent(&v.get_halls()[hallIndex], name, dt)); } +void submenu_ticketManagement() { + +} + +void submenu_eventManagement() { + +} + +void submenu_reportManagement() { + +} +const Menu mainMenu({ submenu_ticketManagement, submenu_eventManagement, submenu_reportManagement }, 3); + void runUI(Venue& venue) { v = venue; } |
