[nostalgia/core/studio] Cleanup and decouple main TileSheetEditor drawing from ImGui
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <ox/model/def.hpp>
|
||||
|
||||
#include <nostalgia/common/bounds.hpp>
|
||||
#include <nostalgia/common/vec.hpp>
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <nostalgia/studio/studio.hpp>
|
||||
@@ -106,7 +107,8 @@ class TileSheetEditor: public studio::Editor {
|
||||
NostalgiaGraphic m_img;
|
||||
AssetRef<NostalgiaPalette> m_pal;
|
||||
float m_pixelSizeMod = 1;
|
||||
ImVec2 m_scrollOffset;
|
||||
common::Vec2 m_scrollOffset;
|
||||
float m_palViewWidth = 200;
|
||||
|
||||
public:
|
||||
TileSheetEditor(Context *ctx, const ox::String &path);
|
||||
@@ -147,7 +149,11 @@ class TileSheetEditor: public studio::Editor {
|
||||
[[nodiscard]]
|
||||
ox::String palettePath(const ox::String &palettePath) const;
|
||||
|
||||
void clickPixel(const ImVec2 &paneSize, float x, float y) noexcept;
|
||||
void drawTileSheet(const common::Vec2 &fbSize) noexcept;
|
||||
|
||||
void drawPalettePicker() noexcept;
|
||||
|
||||
void clickPixel(const common::Vec2 &paneSize, const common::Vec2 &clickPos) noexcept;
|
||||
|
||||
// slots
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user