diff --git a/CMakeLists.txt b/CMakeLists.txt index d095263..a2bbd96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ set(SOURCE_HEADERS include/characteristic/adresse.hpp include/characteristic/endurance.hpp include/characteristic/chance.hpp + include/gui/menu.hpp ) set(SOURCE_FILES @@ -44,6 +45,7 @@ set(SOURCE_FILES src/characteristic/adresse.cpp src/characteristic/endurance.cpp src/characteristic/chance.cpp + src/gui/menu.cpp ) set(SOURCES diff --git a/include/gui/menu.hpp b/include/gui/menu.hpp new file mode 100644 index 0000000..3575d8b --- /dev/null +++ b/include/gui/menu.hpp @@ -0,0 +1,23 @@ +#ifndef BILLYSHEET_MENU_HPP +#define BILLYSHEET_MENU_HPP + + +namespace gui { + class GuiData; + + class Menu final { + private: + GuiData &data; + public: + Menu() noexcept = delete; + + explicit Menu(GuiData &data) noexcept: data(data) {} + + ~Menu() noexcept = default; + + void gui() const noexcept; + }; +} + + +#endif //BILLYSHEET_MENU_HPP diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp new file mode 100644 index 0000000..0b2a620 --- /dev/null +++ b/src/gui/menu.cpp @@ -0,0 +1,13 @@ +#include "gui/menu.hpp" +#include "imgui.h" + +void gui::Menu::gui() const noexcept { + if (ImGui::BeginMainMenuBar()) { + if (ImGui::BeginMenu("File")) { + + + ImGui::EndMenu(); + } + ImGui::EndMainMenuBar(); + } +}