Make theme load/save as windows fill the window too

This commit is contained in:
Zachary Hall 2023-07-17 15:55:19 -07:00
parent 3894aa8537
commit 35077a3e58

View file

@ -205,8 +205,9 @@ bool Theme::ShowEditor(bool* open, Theme* &theme, ImGuiID dockid, int window_wid
}
if (loadOpen) {
ImGui::OpenPopup("Load...");
}
if (ImGui::BeginPopupModal("Load...", &loadOpen)) {
ImGui::SetNextWindowPos(ImVec2(0, 0));
ImGui::SetNextWindowSize(ImVec2(window_width, window_height));
if (ImGui::BeginPopupModal("Load...", nullptr, ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize)) {
static path selectedThemePath;
static char filter[1024] = {0};
ImGui::Text("Filter:"); ImGui::SameLine();
@ -246,10 +247,12 @@ bool Theme::ShowEditor(bool* open, Theme* &theme, ImGuiID dockid, int window_wid
}
ImGui::EndPopup();
}
}
if (saveAsOpen) {
ImGui::OpenPopup("Save as...");
}
if (ImGui::BeginPopupModal("Save as...", &saveAsOpen)) {
ImGui::SetNextWindowPos(ImVec2(0, 0));
ImGui::SetNextWindowSize(ImVec2(window_width, window_height));
if (ImGui::BeginPopupModal("Save as...", nullptr, ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize)) {
static char selectedThemeName[1024] = {0};
static char filter[1024] = {0};
ImGui::Text("Filter:"); ImGui::SameLine();
@ -290,6 +293,7 @@ bool Theme::ShowEditor(bool* open, Theme* &theme, ImGuiID dockid, int window_wid
}
ImGui::EndPopup();
}
}
return false;
}
void Theme::Apply(float hue) {