[studio,nostalgia/core/studio] Give default Palette created studio a default page
All checks were successful
Build / build (push) Successful in 3m23s

This commit is contained in:
Gary Talent 2025-01-19 20:53:27 -06:00
parent 2016f6e605
commit 830f8fe3e4
2 changed files with 7 additions and 4 deletions

View File

@ -21,8 +21,11 @@ static class: public studio::Module {
ox::Vector<ox::UPtr<studio::ItemMaker>> itemMakers(studio::StudioContext&) const noexcept final {
ox::Vector<ox::UniquePtr<studio::ItemMaker>> out;
out.emplace_back(ox::make<studio::ItemMakerT<core::TileSheet>>("Tile Sheet", "TileSheets", FileExt_ng));
out.emplace_back(ox::make<studio::ItemMakerT<core::Palette>>("Palette", "Palettes", FileExt_npal));
out.emplace_back(ox::make<studio::ItemMakerT<TileSheet>>("Tile Sheet", "TileSheets", FileExt_ng));
out.emplace_back(ox::make<studio::ItemMakerT<Palette>>("Palette", "Palettes", FileExt_npal, Palette{
.colorNames = {},
.pages = {{"Page 1", ox::Vector<PaletteColorV1>{}}},
}, ox::ClawFormat::Organic));
return out;
}
} const mod;

View File

@ -218,7 +218,7 @@ class ItemMakerT final: public ItemMaker {
std::move(pParentDir),
std::move(fileExt)),
m_fmt{pFmt} {
installTemplate(ox::make_unique<ItemTemplateT<T>>(std::move(pItem)));
installTemplate(ox::make_unique<ItemTemplateT<T>>("Default", std::move(pItem)));
}
constexpr ItemMakerT(
@ -232,7 +232,7 @@ class ItemMakerT final: public ItemMaker {
std::move(pParentDir),
std::move(fileExt)),
m_fmt{pFmt} {
installTemplate(ox::make_unique<ItemTemplateT<T>>(std::move(pItem)));
installTemplate(ox::make_unique<ItemTemplateT<T>>("Default", std::move(pItem)));
}
ox::StringView typeName() const noexcept override {