Disable viewports and change min size.
This commit is contained in:
parent
bcc899bc78
commit
70e50a7531
1 changed files with 9 additions and 4 deletions
13
main.cpp
13
main.cpp
|
@ -126,7 +126,7 @@ int main(int, char**)
|
||||||
SDL_SetWindowIcon(window, icon);
|
SDL_SetWindowIcon(window, icon);
|
||||||
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
|
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
|
||||||
SDL_GL_MakeCurrent(window, gl_context);
|
SDL_GL_MakeCurrent(window, gl_context);
|
||||||
|
|
||||||
// Setup Dear ImGui context
|
// Setup Dear ImGui context
|
||||||
IMGUI_CHECKVERSION();
|
IMGUI_CHECKVERSION();
|
||||||
ImGui::CreateContext();
|
ImGui::CreateContext();
|
||||||
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue