[nostalgia] Add basic support for subsheets
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "tilesheetpixelgrid.hpp"
|
||||
#include "tilesheetpixels.hpp"
|
||||
#include "tilesheeteditor.hpp"
|
||||
#include "tilesheeteditorview.hpp"
|
||||
|
||||
namespace nostalgia::core {
|
||||
|
||||
@@ -24,8 +24,8 @@ class TileSheetEditorImGui: public studio::Editor {
|
||||
ox::String m_itemPath;
|
||||
ox::String m_itemName;
|
||||
glutils::FrameBuffer m_framebuffer;
|
||||
TileSheetEditor m_tileSheetEditor;
|
||||
float m_palViewWidth = 200;
|
||||
TileSheetEditorView m_tileSheetEditor;
|
||||
float m_palViewWidth = 300;
|
||||
geo::Vec2 m_prevMouseDownPos;
|
||||
|
||||
public:
|
||||
@@ -47,12 +47,24 @@ class TileSheetEditorImGui: public studio::Editor {
|
||||
|
||||
void draw(core::Context*) noexcept override;
|
||||
|
||||
void drawSubsheetSelector(TileSheet::SubSheet*, TileSheet::SubSheetIdx *path) noexcept;
|
||||
|
||||
studio::UndoStack *undoStack() noexcept final;
|
||||
|
||||
protected:
|
||||
void saveItem() override;
|
||||
|
||||
private:
|
||||
[[nodiscard]]
|
||||
constexpr auto model() const noexcept {
|
||||
return m_tileSheetEditor.model();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr auto model() noexcept {
|
||||
return m_tileSheetEditor.model();
|
||||
}
|
||||
|
||||
void setPalette();
|
||||
|
||||
void saveState();
|
||||
@@ -73,7 +85,7 @@ class TileSheetEditorImGui: public studio::Editor {
|
||||
private:
|
||||
ox::Error updateAfterClicked() noexcept;
|
||||
|
||||
ox::Error markUnsavedChanges() noexcept;
|
||||
ox::Error markUnsavedChanges(int) noexcept;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user