[jasper/world] Fix WorldObjectSetEditor to handle .ng and .nts file extensions
All checks were successful
Build / build (push) Successful in 1m45s
All checks were successful
Build / build (push) Successful in 1m45s
This commit is contained in:
@ -32,7 +32,7 @@ WorldObjectSetEditorImGui::WorldObjectSetEditorImGui(
|
||||
m_doc{*readObj<WorldObjectSet>(keelCtx(m_sctx), itemPath()).unwrapThrow()},
|
||||
m_tileSheet{readObj<ngfx::TileSheet>(keelCtx(m_sctx), m_doc.tilesheet)
|
||||
.or_value(keel::AssetRef<ngfx::TileSheet>{})},
|
||||
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<studio::FileRef>("FileRef");
|
||||
if (!err && endsWith(fr.path, ngfx::FileExt_ng)) {
|
||||
if (!err && ngfx::isTileSheet(fr.path)) {
|
||||
oxLogError(setTileSheet(fr.path));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user