Add main tab to API

This commit is contained in:
GriffinR
2021-12-10 01:54:27 -05:00
committed by huderlem
parent 8f62268d00
commit fee9ffcd44
5 changed files with 37 additions and 1 deletions

View File

@@ -167,6 +167,8 @@ public:
Q_INVOKABLE int getNumMetatileLayers();
Q_INVOKABLE int getBaseGameVersion();
Q_INVOKABLE QList<QString> getCustomScripts();
Q_INVOKABLE int getCurrentTab();
Q_INVOKABLE void setCurrentTab(int index);
private slots:
@@ -389,6 +391,7 @@ private:
QString getEventGroupFromTabWidget(QWidget *tab);
void closeSupplementaryWindows();
void setWindowDisabled(bool);
void setMainTab(int);
void initTilesetEditor();
bool initRegionMapEditor();

View File

@@ -15,6 +15,7 @@ enum CallbackType {
OnMapOpened,
OnMapResized,
OnTilesetUpdated,
OnTabChanged,
};
class Scripting
@@ -38,6 +39,7 @@ public:
static void cb_MapOpened(QString mapName);
static void cb_MapResized(int oldWidth, int oldHeight, int newWidth, int newHeight);
static void cb_TilesetUpdated(QString tilesetName);
static void cb_TabChanged(int oldTab, int newTab);
static bool tryErrorJS(QJSValue js);
private: