[nostalgia/core] Add largestPage function for Palette
This commit is contained in:
parent
5972d8acef
commit
2667be88f6
@ -60,6 +60,15 @@ constexpr size_t colors(Palette const&pal, size_t page = 0) noexcept {
|
|||||||
return 0;
|
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)
|
oxModelBegin(NostalgiaPalette)
|
||||||
oxModelField(colors)
|
oxModelField(colors)
|
||||||
oxModelEnd()
|
oxModelEnd()
|
||||||
|
Loading…
Reference in New Issue
Block a user