[nostalgia/studio] Add export option to tilesheet editor

This commit is contained in:
2022-05-25 21:21:28 -05:00
parent 2448bdcc82
commit 0adfaa7901
6 changed files with 103 additions and 31 deletions
@@ -73,16 +73,19 @@ class TileSheetEditorModel: public ox::SignalHandler {
void setActiveSubsheet(const TileSheet::SubSheetIdx&) noexcept;
[[nodiscard]]
constexpr const TileSheet::SubSheet *activeSubSheet() const noexcept {
auto &activeSubSheet = m_img.getSubSheet(m_activeSubsSheetIdx);
return &activeSubSheet;
}
[[nodiscard]]
constexpr TileSheet::SubSheet *activeSubSheet() noexcept {
auto &activeSubSheet = m_img.getSubSheet(m_activeSubsSheetIdx);
return &activeSubSheet;
}
[[nodiscard]]
constexpr const TileSheet::SubSheetIdx &activeSubSheetIdx() const noexcept {
return m_activeSubsSheetIdx;
}
@@ -106,6 +109,7 @@ class TileSheetEditorModel: public ox::SignalHandler {
ox::Error saveFile() noexcept;
[[nodiscard]]
constexpr studio::UndoStack *undoStack() noexcept;
bool pixelSelected(std::size_t idx) const noexcept;