From 0b4ecfa0a2f86b8ab84e7e5605a866a2e1487abd Mon Sep 17 00:00:00 2001 From: sciencewhiz Date: Sun, 5 Jan 2025 21:09:40 -0800 Subject: [PATCH] Make Field2D field picker show JSONs first Too many people don't realize that glass/simgui field2d can load pathweaver JSON field files since it's hidden. --- glass/src/lib/native/cpp/other/Field2D.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/glass/src/lib/native/cpp/other/Field2D.cpp b/glass/src/lib/native/cpp/other/Field2D.cpp index f8ce7155b61..da7430c9ef5 100644 --- a/glass/src/lib/native/cpp/other/Field2D.cpp +++ b/glass/src/lib/native/cpp/other/Field2D.cpp @@ -373,13 +373,12 @@ void FieldInfo::DisplaySettings() { } ImGui::EndCombo(); } - if (m_builtin.empty() && ImGui::Button("Load image...")) { + if (m_builtin.empty() && ImGui::Button("Load JSON/image...")) { m_fileOpener = std::make_unique( - "Choose field image", "", - std::vector{"Image File", + "Choose field JSON/image", "", + std::vector{"PathWeaver JSON File", "*.json", "Image File", "*.jpg *.jpeg *.png *.bmp *.psd *.tga *.gif " - "*.hdr *.pic *.ppm *.pgm", - "PathWeaver JSON File", "*.json"}); + "*.hdr *.pic *.ppm *.pgm"}); } if (ImGui::Button("Reset image")) { Reset();