From d98d78890a001342f0a9def714004bb1fdba1689 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 25 Jun 2025 21:31:28 -0500 Subject: [PATCH] [jasper/world] Fix WorldObjectSetEditor to handle .ng and .nts file extensions --- .../worldobjectseteditor/worldobjectseteditor-imgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jasper/modules/world/src/studio/worldobjectseteditor/worldobjectseteditor-imgui.cpp b/src/jasper/modules/world/src/studio/worldobjectseteditor/worldobjectseteditor-imgui.cpp index 8df9120..a70b5b0 100644 --- a/src/jasper/modules/world/src/studio/worldobjectseteditor/worldobjectseteditor-imgui.cpp +++ b/src/jasper/modules/world/src/studio/worldobjectseteditor/worldobjectseteditor-imgui.cpp @@ -32,7 +32,7 @@ WorldObjectSetEditorImGui::WorldObjectSetEditorImGui( m_doc{*readObj(keelCtx(m_sctx), itemPath()).unwrapThrow()}, m_tileSheet{readObj(keelCtx(m_sctx), m_doc.tilesheet) .or_value(keel::AssetRef{})}, - m_tsPicker{"Tile Sheet Chooser", keelCtx(m_sctx), ngfx::FileExt_nts}, + m_tsPicker{"Tile Sheet Chooser", keelCtx(m_sctx), ngfx::FileExts_TileSheet}, m_addPalPopup{"Palette Chooser", keelCtx(m_sctx), ngfx::FileExt_npal} { auto &kctx = keelCtx(m_sctx); auto const [tsPath, err] = getPath(kctx, m_doc.tilesheet); @@ -114,7 +114,7 @@ void WorldObjectSetEditorImGui::drawTileSheetSelector() noexcept { ig::InputTextWithHint("##Tile Sheet", "Path to Tile Sheet", m_tilesheetPath, tsFlags); if (ig::DragDropTarget const d; d) { auto const [fr, err] = ig::getDragDropPayload("FileRef"); - if (!err && endsWith(fr.path, ngfx::FileExt_ng)) { + if (!err && ngfx::isTileSheet(fr.path)) { oxLogError(setTileSheet(fr.path)); } }