[nostalgia/core/studio] Add scrolling support to TileSheetEditor
This commit is contained in:
@@ -100,13 +100,13 @@ class TileSheetEditor: public studio::Editor {
|
||||
ox::String m_itemPath;
|
||||
ox::String m_itemName;
|
||||
glutils::FrameBuffer m_framebuffer;
|
||||
TileSheetGrid m_pixelGrid;
|
||||
TileSheetPixels m_pixels;
|
||||
TileSheetGrid m_pixelGridDrawer;
|
||||
TileSheetPixels m_pixelsDrawer;
|
||||
bool m_updated = false;
|
||||
NostalgiaGraphic m_img;
|
||||
AssetRef<NostalgiaPalette> m_pal;
|
||||
Context *m_ctx = nullptr;
|
||||
float m_pixelSizeMod = 1;
|
||||
ImVec2 m_scrollOffset;
|
||||
|
||||
public:
|
||||
TileSheetEditor(Context *ctx, const ox::String &path);
|
||||
@@ -132,6 +132,8 @@ class TileSheetEditor: public studio::Editor {
|
||||
protected:
|
||||
void saveItem() override;
|
||||
|
||||
void getFillPixels(bool *pixels, common::Point pt, int oldColor) const;
|
||||
|
||||
private:
|
||||
void setPalette();
|
||||
|
||||
@@ -145,6 +147,8 @@ class TileSheetEditor: public studio::Editor {
|
||||
[[nodiscard]]
|
||||
ox::String palettePath(const ox::String &palettePath) const;
|
||||
|
||||
void clickPixel(const ImVec2 &paneSize, float x, float y) noexcept;
|
||||
|
||||
// slots
|
||||
public:
|
||||
ox::Error colorSelected() noexcept;
|
||||
|
||||
Reference in New Issue
Block a user