From 830f8fe3e4aad93f045e56cc4cdce851b5de0b70 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 19 Jan 2025 20:53:27 -0600 Subject: [PATCH] [studio,nostalgia/core/studio] Give default Palette created studio a default page --- src/nostalgia/modules/core/src/studio/studiomodule.cpp | 7 +++++-- src/olympic/studio/modlib/include/studio/itemmaker.hpp | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/nostalgia/modules/core/src/studio/studiomodule.cpp b/src/nostalgia/modules/core/src/studio/studiomodule.cpp index f789c2a6..91a2dc5b 100644 --- a/src/nostalgia/modules/core/src/studio/studiomodule.cpp +++ b/src/nostalgia/modules/core/src/studio/studiomodule.cpp @@ -21,8 +21,11 @@ static class: public studio::Module { ox::Vector> itemMakers(studio::StudioContext&) const noexcept final { ox::Vector> out; - out.emplace_back(ox::make>("Tile Sheet", "TileSheets", FileExt_ng)); - out.emplace_back(ox::make>("Palette", "Palettes", FileExt_npal)); + out.emplace_back(ox::make>("Tile Sheet", "TileSheets", FileExt_ng)); + out.emplace_back(ox::make>("Palette", "Palettes", FileExt_npal, Palette{ + .colorNames = {}, + .pages = {{"Page 1", ox::Vector{}}}, + }, ox::ClawFormat::Organic)); return out; } } const mod; diff --git a/src/olympic/studio/modlib/include/studio/itemmaker.hpp b/src/olympic/studio/modlib/include/studio/itemmaker.hpp index e0b70e61..85a9e6ce 100644 --- a/src/olympic/studio/modlib/include/studio/itemmaker.hpp +++ b/src/olympic/studio/modlib/include/studio/itemmaker.hpp @@ -218,7 +218,7 @@ class ItemMakerT final: public ItemMaker { std::move(pParentDir), std::move(fileExt)), m_fmt{pFmt} { - installTemplate(ox::make_unique>(std::move(pItem))); + installTemplate(ox::make_unique>("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>(std::move(pItem))); + installTemplate(ox::make_unique>("Default", std::move(pItem))); } ox::StringView typeName() const noexcept override {