Menu bar is coming
This commit is contained in:
parent
45c92db758
commit
58a16c68e4
@ -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
|
||||
|
23
include/gui/menu.hpp
Normal file
23
include/gui/menu.hpp
Normal file
@ -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
|
13
src/gui/menu.cpp
Normal file
13
src/gui/menu.cpp
Normal file
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user