mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-11 02:15:38 -05:00
Add 'onEventSpriteLoading' to API
Some checks are pending
Build Porymap / build-linux (, 5.14.2) (push) Waiting to run
Build Porymap / build-linux (, 6.8.*) (push) Waiting to run
Build Porymap / build-linux (minimal, 5.14.2) (push) Waiting to run
Build Porymap / build-macos (macos-15-intel) (push) Waiting to run
Build Porymap / build-macos (macos-latest) (push) Waiting to run
Build Porymap / build-static-windows (push) Waiting to run
Some checks are pending
Build Porymap / build-linux (, 5.14.2) (push) Waiting to run
Build Porymap / build-linux (, 6.8.*) (push) Waiting to run
Build Porymap / build-linux (minimal, 5.14.2) (push) Waiting to run
Build Porymap / build-macos (macos-15-intel) (push) Waiting to run
Build Porymap / build-macos (macos-latest) (push) Waiting to run
Build Porymap / build-static-windows (push) Waiting to run
This commit is contained in:
@@ -213,7 +213,6 @@ public:
|
||||
QMap<QString, QMap<QString, QString>> readObjEventGfxInfo();
|
||||
|
||||
QPixmap getEventPixmap(const QString &gfxName, const QString &movementName);
|
||||
QPixmap getEventPixmap(const QString &gfxName, int frame, bool hFlip);
|
||||
QPixmap getEventPixmap(Event::Group group);
|
||||
void loadEventPixmap(Event *event, bool forceLoad = false);
|
||||
|
||||
@@ -360,6 +359,7 @@ private:
|
||||
bool appendTextFile(const QString &path, const QString &text);
|
||||
|
||||
QString findSpeciesIconPath(const QStringList &names) const;
|
||||
QPixmap getEventPixmap(const QString &gfxName, int frame, bool hFlip);
|
||||
|
||||
int maxObjectEvents;
|
||||
int maxMapDataSize;
|
||||
|
||||
@@ -37,6 +37,7 @@ enum CallbackType {
|
||||
OnMainTabChanged,
|
||||
OnMapViewTabChanged,
|
||||
OnBorderVisibilityToggled,
|
||||
OnEventSpriteLoading,
|
||||
};
|
||||
|
||||
class Scripting
|
||||
@@ -67,6 +68,7 @@ public:
|
||||
static void cb_MainTabChanged(int oldTab, int newTab);
|
||||
static void cb_MapViewTabChanged(int oldTab, int newTab);
|
||||
static void cb_BorderVisibilityToggled(bool visible);
|
||||
static QImage cb_EventSpriteLoading(const QString &gfxName, const QString &direction);
|
||||
|
||||
static bool tryErrorJS(QJSValue js);
|
||||
static QJSValue fromBlock(Block block);
|
||||
@@ -127,7 +129,7 @@ private:
|
||||
ScriptUtility *scriptUtility;
|
||||
|
||||
void loadScript(const QString &filepath);
|
||||
void invokeCallback(CallbackType type, const QJSValueList &args);
|
||||
QJSValue invokeCallback(CallbackType type, const QJSValueList &args);
|
||||
QSharedPointer<Script> getActiveScript() const;
|
||||
QJSValue call(QSharedPointer<Script> script, QJSValue func, const QJSValueList &args = QJSValueList());
|
||||
bool askForTrust(QSharedPointer<Script> script, const QString &reason);
|
||||
@@ -159,6 +161,7 @@ public:
|
||||
static void cb_MainTabChanged(int, int) {};
|
||||
static void cb_MapViewTabChanged(int, int) {};
|
||||
static void cb_BorderVisibilityToggled(bool) {};
|
||||
static QImage cb_EventSpriteLoading(const QString &, const QString &) {};
|
||||
};
|
||||
|
||||
#endif // QT_QML_LIB
|
||||
|
||||
Reference in New Issue
Block a user