diff --git a/src/nostalgia/modules/core/include/nostalgia/core/palette.hpp b/src/nostalgia/modules/core/include/nostalgia/core/palette.hpp index 06eba728..72f97859 100644 --- a/src/nostalgia/modules/core/include/nostalgia/core/palette.hpp +++ b/src/nostalgia/modules/core/include/nostalgia/core/palette.hpp @@ -60,6 +60,15 @@ constexpr size_t colors(Palette const&pal, size_t page = 0) noexcept { return 0; } +[[nodiscard]] +constexpr size_t largestPage(Palette const&pal) noexcept { + size_t out{}; + for (auto const&page : pal.pages) { + out = ox::max(out, page.size()); + } + return out; +} + oxModelBegin(NostalgiaPalette) oxModelField(colors) oxModelEnd()