Commit 7ca4cde9 authored by Johannes Braun's avatar Johannes Braun
Browse files

Add main menu bar

parent e174ec52
......@@ -708,6 +708,7 @@ void Editor::drawPreview()
void Editor::drawSettings()
{
drawMenuBar();
int w, h;
glfwGetFramebufferSize(*m_window, &w, &h);
glBlitNamedFramebuffer(
......@@ -1042,6 +1043,28 @@ void Editor::processInputsFields()
}
}
void Editor::drawMenuBar()
{
if (ImGui::BeginMainMenuBar())
{
if (ImGui::BeginMenu("File"))
{
if (ImGui::MenuItem("Open Scene", "Ctrl+O"))
loadScene();
if (ImGui::MenuItem("Save Scene", "Ctrl+S"))
saveScene();
ImGui::Separator();
if (ImGui::MenuItem("Exit", "Alt+F4"))
{
}
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
}
}
void Editor::saveScene()
{
const std::filesystem::path p = "./../resources/distanceFields/";
......
......@@ -57,6 +57,7 @@ private:
void drawLightsTab();
void drawRenderingTab();
void drawPreview();
void drawMenuBar();
void processInputsEditor();
void processInputsMain();
void processInputsFields();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment