mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-13 12:26:05 -05:00
Add support for opening .inc scripts to the selected event script
This commit is contained in:
@@ -40,8 +40,8 @@ class ParseUtil
|
||||
public:
|
||||
ParseUtil();
|
||||
void set_root(QString);
|
||||
QString readTextFile(QString);
|
||||
void strip_comment(QString*);
|
||||
static QString readTextFile(QString);
|
||||
static void strip_comment(QString*);
|
||||
QList<QStringList>* parseAsm(QString);
|
||||
int evaluateDefine(QString, QMap<QString, int>*);
|
||||
QStringList readCArray(QString text, QString label);
|
||||
@@ -54,6 +54,10 @@ public:
|
||||
bool tryParseJsonFile(QJsonDocument *out, QString filepath);
|
||||
bool ensureFieldsExist(QJsonObject obj, QList<QString> fields);
|
||||
|
||||
// Returns the 1-indexed line number for the definition of scriptLabel in the scripts file at filePath.
|
||||
// Returns 0 if a definition for scriptLabel cannot be found.
|
||||
static int getScriptLineNumber(const QString &scriptLabel, const QString &filePath);
|
||||
|
||||
private:
|
||||
QString root;
|
||||
QString text;
|
||||
|
||||
@@ -154,6 +154,7 @@ public:
|
||||
void scaleMapView(int);
|
||||
|
||||
public slots:
|
||||
void openMapScripts() const;
|
||||
void maskNonVisibleConnectionTiles();
|
||||
|
||||
private:
|
||||
@@ -183,6 +184,7 @@ private:
|
||||
QString getMovementPermissionText(uint16_t collision, uint16_t elevation);
|
||||
QString getMetatileDisplayMessage(uint16_t metatileId);
|
||||
bool eventLimitReached(Map *, QString);
|
||||
QString constructTextEditorCommand(QString commandTemplate, const QString &path) const;
|
||||
|
||||
private slots:
|
||||
void onMapStartPaint(QGraphicsSceneMouseEvent *event, MapPixmapItem *item);
|
||||
|
||||
@@ -119,8 +119,6 @@ private slots:
|
||||
|
||||
void duplicate();
|
||||
|
||||
void openInTextEditor();
|
||||
|
||||
void onLoadMapRequested(QString, QString);
|
||||
void onMapChanged(Map *map);
|
||||
void onMapNeedsRedrawing();
|
||||
@@ -164,7 +162,6 @@ private slots:
|
||||
void on_actionMap_Shift_triggered();
|
||||
|
||||
void on_toolButton_deleteObject_clicked();
|
||||
void on_toolButton_Open_Scripts_clicked();
|
||||
|
||||
void addNewEvent(QString);
|
||||
void updateSelectedObjects();
|
||||
|
||||
Reference in New Issue
Block a user