Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Menubar.hpp
1#pragma once
2
3#include <atomic>
4#include <thread>
5
6namespace Grindstone {
7 class EngineCore;
8
9 namespace Editor::ImguiEditor {
10 class ImguiEditor;
11 class Menubar {
12 public:
13 Menubar(ImguiEditor* editor);
14 void Render();
15 void RegisterMenuItem(const char* menuItem, void(*fn)(), const char* shortcut);
16 void DeregisterMenuItem(const char* menuItem);
17 private:
18 void RenderFileMenu();
19 void RenderEditMenu();
20 void RenderViewMenu();
21 private:
22 void OnNewFile();
23 void OnSaveFile();
24 void OnSaveAsFile();
25 void OnReloadFile();
26 void OnLoadFile();
27 void OnBuild();
28 void OnImportFile();
29 void OnUserSettings();
30 void OnProjectSettings();
31 void OnExit();
32
33 void SaveFile(const std::filesystem::path& path);
34 ImguiEditor* editor = nullptr;
35
36 struct MenubarItem {
37 std::string text; // Eventually we should localize this
38 std::string shortcut;
39 void (*fnPtr)();
40 };
41
42 // In the future, this should be a tree
43 std::vector<MenubarItem> menuItems;
44 };
45 }
46}
Definition EngineCore.hpp:59