mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
GUI: center file picker and limit to win size
This commit is contained in:
parent
3a87017821
commit
797ffd62da
2 changed files with 2 additions and 1 deletions
1
extern/igfd/ImGuiFileDialog.cpp
vendored
1
extern/igfd/ImGuiFileDialog.cpp
vendored
|
@ -3617,6 +3617,7 @@ namespace IGFD
|
|||
}
|
||||
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
|
||||
// if decoration is enabled we disable the resizing feature of imgui for avoid crash with SDL2 and GLFW3
|
||||
if (ImGui::GetIO().ConfigViewportsNoDecoration)
|
||||
|
|
|
@ -3501,7 +3501,7 @@ bool FurnaceGUI::loop() {
|
|||
drawPattern();
|
||||
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()) {
|
||||
fileName=ImGuiFileDialog::Instance()->GetFilePathName();
|
||||
if (fileName!="") {
|
||||
|
|
Loading…
Reference in a new issue