-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (24 loc) · 762 Bytes
/
main.cpp
File metadata and controls
32 lines (24 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Include memory for smart pointers
#include <memory>
#include "Menu/MyMenu.h"
#include "Menu/Items/DemoItem1.h"
#include "Menu/Items/DemoItem2.h"
int main() {
// Create a new instance of MyMenu with "Main Menu" title
auto menu = std::make_unique<MyMenu>("Main Menu");
// Create a new DemoItem1 instance with name "Test"
auto item = std::make_unique<DemoItem1>("Test");
// Create a new DemoItem2 instance with name "Test2"
auto item2 = std::make_unique<DemoItem2>("Test2");
// Append DemoItem1 and DemoItem2 to the menu
menu->AppendItem(std::move(item));
menu->AppendItem(std::move(item2));
// Start the menu interaction
menu->Start();
return 0;
}
/*
* cmake -S . -B build/
* in build/ : "make"
*
*/