GUI: center file picker and limit to win size
This commit is contained in:
parent
3a87017821
commit
797ffd62da
1
extern/igfd/ImGuiFileDialog.cpp
vendored
1
extern/igfd/ImGuiFileDialog.cpp
vendored
|
@ -3617,6 +3617,7 @@ namespace IGFD
|
||||||
}
|
}
|
||||||
if (beg)
|
if (beg)
|
||||||
{
|
{
|
||||||
|
ImGui::SetWindowPos(ImVec2((ImGui::GetMainViewport()->Size.x-ImGui::GetWindowWidth())*0.5f,(ImGui::GetMainViewport()->Size.y-ImGui::GetWindowHeight())*0.5f));
|
||||||
#ifdef IMGUI_HAS_VIEWPORT
|
#ifdef IMGUI_HAS_VIEWPORT
|
||||||
// if decoration is enabled we disable the resizing feature of imgui for avoid crash with SDL2 and GLFW3
|
// if decoration is enabled we disable the resizing feature of imgui for avoid crash with SDL2 and GLFW3
|
||||||
if (ImGui::GetIO().ConfigViewportsNoDecoration)
|
if (ImGui::GetIO().ConfigViewportsNoDecoration)
|
||||||
|
|
|
@ -3501,7 +3501,7 @@ bool FurnaceGUI::loop() {
|
||||||
drawPattern();
|
drawPattern();
|
||||||
drawSettings();
|
drawSettings();
|
||||||
|
|
||||||
if (ImGuiFileDialog::Instance()->Display("FileDialog",ImGuiWindowFlags_NoCollapse,ImVec2(600.0f*dpiScale,400.0f*dpiScale))) {
|
if (ImGuiFileDialog::Instance()->Display("FileDialog",ImGuiWindowFlags_NoCollapse|ImGuiWindowFlags_NoMove,ImVec2(600.0f*dpiScale,400.0f*dpiScale),ImVec2(scrW*dpiScale,scrH*dpiScale))) {
|
||||||
if (ImGuiFileDialog::Instance()->IsOk()) {
|
if (ImGuiFileDialog::Instance()->IsOk()) {
|
||||||
fileName=ImGuiFileDialog::Instance()->GetFilePathName();
|
fileName=ImGuiFileDialog::Instance()->GetFilePathName();
|
||||||
if (fileName!="") {
|
if (fileName!="") {
|
||||||
|
|
Loading…
Reference in a new issue