Patch update - add menu button
This commit is contained in:
@@ -466,4 +466,5 @@ void SystemClass::SendPath(wchar_t* path, std::filesystem::path WFolder)
|
||||
{
|
||||
m_Application->SetPath(path);
|
||||
m_Application->SetWFolder(WFolder);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -70,6 +70,19 @@ void imguiManager::SetupDockspace() {
|
||||
ImGui::Begin("DockSpace", nullptr, window_flags);
|
||||
ImGui::PopStyleVar(2);
|
||||
|
||||
if (ImGui::BeginMenuBar()) {
|
||||
if (ImGui::BeginMenu("Windows")) {
|
||||
ImGui::MenuItem("Object Window", NULL, &showObjectWindow);
|
||||
ImGui::MenuItem("Terrain Window", NULL, &showTerrainWindow);
|
||||
ImGui::MenuItem("Light Window", NULL, &showLightWindow);
|
||||
ImGui::MenuItem("Shader Window", NULL, &showShaderWindow);
|
||||
ImGui::MenuItem("Engine Settings Window", NULL, &showEngineSettingsWindow);
|
||||
ImGui::MenuItem("Log Window", NULL, &showLogWindow);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
|
||||
ImGuiID dockspace_id = ImGui::GetID("MainDockSpace");
|
||||
ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), ImGuiDockNodeFlags_PassthruCentralNode);
|
||||
|
||||
@@ -355,38 +368,6 @@ bool imguiManager::ImGuiWidgetRenderer(ApplicationClass* app)
|
||||
WidgetButton();
|
||||
WidgetFPS();
|
||||
WidgetAddObject(app);
|
||||
ImGui::Separator();
|
||||
|
||||
// Add buttons for opening windows
|
||||
if (ImGui::Button("Open Object Window"))
|
||||
{
|
||||
showObjectWindow = true;
|
||||
}
|
||||
|
||||
if (ImGui::Button("Open Terrain Window"))
|
||||
{
|
||||
showTerrainWindow = true;
|
||||
}
|
||||
|
||||
if (ImGui::Button("Open Light Window"))
|
||||
{
|
||||
showLightWindow = true;
|
||||
}
|
||||
|
||||
if (ImGui::Button("Open Shader Window"))
|
||||
{
|
||||
showShaderWindow = true;
|
||||
}
|
||||
|
||||
if (ImGui::Button("Open Engine Settings Window"))
|
||||
{
|
||||
showEngineSettingsWindow = true;
|
||||
}
|
||||
|
||||
if (ImGui::Button("Open Log Window"))
|
||||
{
|
||||
showLogWindow = true;
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
|
||||
|
Reference in New Issue
Block a user