Squashed 'deps/nostalgia/' changes from 0de428a2..00e52b64
00e52b64 [nostalgia] Make pkg-dmg more versatile ae404879 [nostalgia/gfx] Add navigateTo handler to TileSheetEditor 84b612c6 [studio/modlib] Give navigateTo a default argument 3c2a6b04 [studio/applib] Make navigateTo handle UUID paths 626da322 [ox/std] Add StringParam(IString const&) constructor git-subtree-dir: deps/nostalgia git-subtree-split: 00e52b649141b3daffd9a10b0320b142499c536f
This commit is contained in:
@@ -31,7 +31,15 @@ static bool shutdownHandler(turbine::Context &ctx) {
|
||||
}
|
||||
|
||||
void navigateTo(Context &ctx, ox::StringParam filePath, ox::StringParam navArgs) noexcept {
|
||||
ctx.ui.navigateTo(std::move(filePath), std::move(navArgs));
|
||||
ox::String path = std::move(filePath);
|
||||
if (beginsWith(path, "uuid://")) {
|
||||
auto [p, err] = keel::uuidUrlToPath(keelCtx(ctx), path);
|
||||
if (err) {
|
||||
return;
|
||||
}
|
||||
path = p;
|
||||
}
|
||||
ctx.ui.navigateTo(std::move(path), std::move(navArgs));
|
||||
}
|
||||
|
||||
namespace ig {
|
||||
|
@@ -27,6 +27,6 @@ inline keel::Context &keelCtx(Context &ctx) noexcept {
|
||||
return keelCtx(ctx.tctx);
|
||||
}
|
||||
|
||||
void navigateTo(Context &ctx, ox::StringParam filePath, ox::StringParam navArgs) noexcept;
|
||||
void navigateTo(Context &ctx, ox::StringParam filePath, ox::StringParam navArgs = "") noexcept;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user