Support custom fields for top-level map attributes

This commit is contained in:
Marcus Huderle
2019-02-03 10:38:45 -06:00
committed by huderlem
parent d70145d89a
commit a894bea71b
8 changed files with 455 additions and 197 deletions

View File

@@ -38,6 +38,7 @@ public:
QString battle_scene;
QString sharedEventsMap = "";
QString sharedScriptsMap = "";
QMap<QString, QString> customHeaders;
MapLayout *layout;
bool isPersistedToFile = true;
bool needsLayoutDir = true;

View File

@@ -74,6 +74,7 @@ public:
void updatePrimaryTileset(QString tilesetLabel, bool forceLoad = false);
void updateSecondaryTileset(QString tilesetLabel, bool forceLoad = false);
void toggleBorderVisibility(bool visible);
void updateCustomMapHeaderValues(QTableWidget *);
Tileset *getCurrentMapPrimaryTileset();
DraggablePixmapItem *addMapEvent(Event *event);

View File

@@ -152,12 +152,12 @@ private slots:
void selectedEventIndexChanged(int index);
void on_horizontalSlider_CollisionTransparency_valueChanged(int value);
void on_toolButton_ExpandAll_clicked();
void on_toolButton_CollapseAll_clicked();
void on_actionAbout_Porymap_triggered();
void on_pushButton_AddCustomHeaderField_clicked();
void on_pushButton_DeleteCustomHeaderField_clicked();
void on_tableWidget_CustomHeaderFields_cellChanged(int row, int column);
private:
Ui::MainWindow *ui;

View File

@@ -70,6 +70,7 @@ public:
QList<QStringList>* getLabelMacros(QList<QStringList>*, QString);
QStringList* getLabelValues(QList<QStringList>*, QString);
QMap<QString, bool> getTopLevelMapFields();
bool loadMapData(Map*);
void readMapLayouts();
void loadMapLayout(Map*);