Disable viewports and change min size.

This commit is contained in:
Zachary Hall 2023-07-16 13:00:04 -07:00
parent bcc899bc78
commit 70e50a7531

View file

@ -134,7 +134,7 @@ int main(int, char**)
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; //io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
io.IniFilename = strdup((std::string(prefPath) + "imgui.ini").c_str()); io.IniFilename = strdup((std::string(prefPath) + "imgui.ini").c_str());
if (enable_kms) { if (enable_kms) {
io.MouseDrawCursor = true; io.MouseDrawCursor = true;
@ -185,6 +185,11 @@ int main(int, char**)
#endif #endif
); );
fileDialog.SetPwd(path(userdir) / path("Music")); fileDialog.SetPwd(path(userdir) / path("Music"));
int window_width = 475;
int window_height = 354;
SDL_SetWindowMinimumSize(window, window_width, window_height);
fileDialog.SetWindowSize(window_width, window_height);
//fileDialog.SetWindowPos(0, 0);
Playback *playback = new Playback(); Playback *playback = new Playback();
float position = 0.0; float position = 0.0;
// Main loop // Main loop
@ -241,7 +246,7 @@ int main(int, char**)
#else #else
while (!done) while (!done)
#endif #endif
{ {/*
{ {
int min_x; int min_x;
int min_y; int min_y;
@ -251,7 +256,7 @@ int main(int, char**)
min_y = height; min_y = height;
SDL_SetWindowMinimumSize(window, 475, min_y); SDL_SetWindowMinimumSize(window, 475, min_y);
} }
} }*/
position = playback->GetPosition(); position = playback->GetPosition();
// Poll and handle events (inputs, window resize, etc.) // Poll and handle events (inputs, window resize, etc.)
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.