mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 23:25:09 -05:00
Add grids to tileset editor
This commit is contained in:
@@ -62,6 +62,8 @@ public:
|
||||
this->showCursorTile = true;
|
||||
this->showBorder = true;
|
||||
this->showGrid = false;
|
||||
this->showTilesetEditorMetatileGrid = false;
|
||||
this->showTilesetEditorLayerGrid = true;
|
||||
this->monitorFiles = true;
|
||||
this->tilesetCheckerboardFill = true;
|
||||
this->theme = "default";
|
||||
@@ -88,6 +90,8 @@ public:
|
||||
void setShowCursorTile(bool enabled);
|
||||
void setShowBorder(bool enabled);
|
||||
void setShowGrid(bool enabled);
|
||||
void setShowTilesetEditorMetatileGrid(bool enabled);
|
||||
void setShowTilesetEditorLayerGrid(bool enabled);
|
||||
void setMonitorFiles(bool monitor);
|
||||
void setTilesetCheckerboardFill(bool checkerboard);
|
||||
void setTheme(QString theme);
|
||||
@@ -113,6 +117,8 @@ public:
|
||||
bool getShowCursorTile();
|
||||
bool getShowBorder();
|
||||
bool getShowGrid();
|
||||
bool getShowTilesetEditorMetatileGrid();
|
||||
bool getShowTilesetEditorLayerGrid();
|
||||
bool getMonitorFiles();
|
||||
bool getTilesetCheckerboardFill();
|
||||
QString getTheme();
|
||||
@@ -156,6 +162,8 @@ private:
|
||||
bool showCursorTile;
|
||||
bool showBorder;
|
||||
bool showGrid;
|
||||
bool showTilesetEditorMetatileGrid;
|
||||
bool showTilesetEditorLayerGrid;
|
||||
bool monitorFiles;
|
||||
bool tilesetCheckerboardFill;
|
||||
QString theme;
|
||||
|
||||
@@ -19,6 +19,7 @@ public:
|
||||
void setTilesets(Tileset*, Tileset*);
|
||||
void setMetatile(Metatile*);
|
||||
void clearLastModifiedCoords();
|
||||
bool showGrid;
|
||||
private:
|
||||
Metatile* metatile;
|
||||
Tileset *primaryTileset;
|
||||
|
||||
@@ -84,6 +84,8 @@ private slots:
|
||||
void on_actionShow_Unused_toggled(bool checked);
|
||||
void on_actionShow_Counts_toggled(bool checked);
|
||||
void on_actionShow_UnusedTiles_toggled(bool checked);
|
||||
void on_actionMetatile_Grid_triggered(bool checked);
|
||||
void on_actionLayer_Grid_triggered(bool checked);
|
||||
|
||||
void on_actionUndo_triggered();
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
QVector<uint16_t> usedMetatiles;
|
||||
bool selectorShowUnused = false;
|
||||
bool selectorShowCounts = false;
|
||||
bool showGrid;
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent*);
|
||||
@@ -35,10 +36,12 @@ private:
|
||||
Tileset *secondaryTileset = nullptr;
|
||||
uint16_t selectedMetatile;
|
||||
int numMetatilesWide;
|
||||
int numMetatilesHigh;
|
||||
uint16_t getMetatileId(int x, int y);
|
||||
QPoint getMetatileIdCoords(uint16_t);
|
||||
bool shouldAcceptEvent(QGraphicsSceneMouseEvent*);
|
||||
|
||||
int numRows(int numMetatiles);
|
||||
int numRows();
|
||||
void drawFilters();
|
||||
void drawUnused();
|
||||
void drawCounts();
|
||||
|
||||
Reference in New Issue
Block a user