Skip to content

Commit

Permalink
Make Field2D field picker show JSONs first
Browse files Browse the repository at this point in the history
Too many people don't realize that glass/simgui field2d can load
pathweaver JSON field files since it's hidden.
  • Loading branch information
sciencewhiz committed Jan 6, 2025
1 parent 159e18c commit 0b4ecfa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions glass/src/lib/native/cpp/other/Field2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<pfd::open_file>(
"Choose field image", "",
std::vector<std::string>{"Image File",
"Choose field JSON/image", "",
std::vector<std::string>{"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();
Expand Down

0 comments on commit 0b4ecfa

Please sign in to comment.