@@ -56,7 +56,7 @@ void MainGui::Init(ImGuiFontManager* fontManager, PackfileVFS* packfileVFS, DX11
56
56
AddMenuItem (" " , true , CreateHandle<StatusBar>());
57
57
AddMenuItem (" View/Start page" , true , CreateHandle<StartPanel>());
58
58
AddMenuItem (" View/Log" , false , CreateHandle<LogPanel> ());
59
- AddMenuItem (" View/File explorer" , true , CreateHandle<FileExplorer>());
59
+ AddMenuItem (" View/File explorer" , false , CreateHandle<FileExplorer>());
60
60
AddMenuItem (" View/Scriptx viewer (WIP)" , false , CreateHandle<ScriptxEditor>(&State));
61
61
62
62
// Not added to the menu. Only available through key shortcut so people don't go messing with the registry unless they know what they're doing
@@ -895,8 +895,8 @@ void MainGui::DrawProjectSaveLoadDialogs()
895
895
if (State.CurrentProject ->Loaded () && State.CurrentProject ->Saving )
896
896
{
897
897
ImGui::OpenPopup (saveDialogName);
898
- ImVec2 viewportSize = ImGui::GetMainViewport ()-> Size ;
899
- ImGui::SetNextWindowPos ({ viewportSize. x / 2 . 7f , viewportSize. y / 2 . 7f }, ImGuiCond_Appearing ); // Auto center
898
+ ImGuiIO& io = ImGui::GetIO () ;
899
+ ImGui::SetNextWindowPos (ImVec2 (io. DisplaySize . x * 0 . 5f , io. DisplaySize . y * 0 . 5f ), ImGuiCond_Always, ImVec2 ( 0 . 5f , 0 . 5f ) ); // Auto center
900
900
if (ImGui::BeginPopupModal (saveDialogName, nullptr , ImGuiWindowFlags_AlwaysAutoResize))
901
901
{
902
902
ImGui::Text (State.CurrentProject ->SaveThreadState .c_str ());
@@ -910,6 +910,8 @@ void MainGui::DrawProjectSaveLoadDialogs()
910
910
if (State.CurrentProject ->Loading )
911
911
{
912
912
ImGui::OpenPopup (loadDialogName);
913
+ ImGuiIO& io = ImGui::GetIO ();
914
+ ImGui::SetNextWindowPos (ImVec2 (io.DisplaySize .x * 0 .5f , io.DisplaySize .y * 0 .5f ), ImGuiCond_Always, ImVec2 (0 .5f , 0 .5f )); // Auto center
913
915
if (ImGui::BeginPopupModal (loadDialogName, nullptr , ImGuiWindowFlags_AlwaysAutoResize))
914
916
{
915
917
ImGui::Text (State.CurrentProject ->LoadThreadState .c_str ());
0 commit comments