mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-14 03:45:35 -05:00
Add onTilesetUpdated to scripting callbacks
This commit is contained in:
@@ -212,6 +212,7 @@ signals:
|
||||
void currentMetatilesSelectionChanged();
|
||||
void mapRulerStatusChanged(const QString &);
|
||||
void editedMapData();
|
||||
void tilesetUpdated(QString);
|
||||
};
|
||||
|
||||
#endif // EDITOR_H
|
||||
|
||||
@@ -13,6 +13,7 @@ enum CallbackType {
|
||||
OnProjectClosed,
|
||||
OnBlockChanged,
|
||||
OnMapOpened,
|
||||
OnTilesetUpdated,
|
||||
};
|
||||
|
||||
class Scripting
|
||||
@@ -32,6 +33,7 @@ public:
|
||||
static void cb_ProjectClosed(QString projectPath);
|
||||
static void cb_MetatileChanged(int x, int y, Block prevBlock, Block newBlock);
|
||||
static void cb_MapOpened(QString mapName);
|
||||
static void cb_TilesetUpdated(QString tilesetName);
|
||||
static bool tryErrorJS(QJSValue js);
|
||||
|
||||
private:
|
||||
|
||||
@@ -31,6 +31,8 @@ public:
|
||||
void setExternalSelection(int, int, QList<uint16_t>, QList<QPair<uint16_t, uint16_t>>);
|
||||
QPoint getMetatileIdCoordsOnWidget(uint16_t);
|
||||
void setMap(Map*);
|
||||
Tileset *primaryTileset;
|
||||
Tileset *secondaryTileset;
|
||||
protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent*);
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent*);
|
||||
@@ -41,8 +43,6 @@ private:
|
||||
bool externalSelection;
|
||||
int numMetatilesWide;
|
||||
Map *map;
|
||||
Tileset *primaryTileset;
|
||||
Tileset *secondaryTileset;
|
||||
QList<uint16_t> *selectedMetatiles;
|
||||
QList<QPair<uint16_t, uint16_t>> *selectedCollisions;
|
||||
int externalSelectionWidth;
|
||||
|
||||
Reference in New Issue
Block a user