Website Summary Files Commits Branches @commit @diff @stats
path: root / src / ConsoleInterface / Menu.cpp
diff options
context:
space:
mode:
1 files changed, 6 insertions, 0 deletions
-rw-r--r--src/ConsoleInterface/Menu.cpp6
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!");