diff --git a/forms/mainwindow.ui b/forms/mainwindow.ui
index 44d69d30..eb6c7345 100644
--- a/forms/mainwindow.ui
+++ b/forms/mainwindow.ui
@@ -1155,7 +1155,7 @@
2
-
-
+
Layout
@@ -2220,7 +2220,7 @@
0
-
-
+
false
@@ -2236,206 +2236,10 @@
QFrame::Shadow::Raised
-
-
- QFormLayout::FieldGrowthPolicy::FieldsStayAtSizeHint
-
-
- 12
-
+
9
-
-
-
-
- Song
-
-
-
- -
-
-
- <html><head/><body><p>The default background music for this map.</p></body></html>
-
-
- true
-
-
-
- -
-
-
- Location
-
-
-
- -
-
-
- <html><head/><body><p>The section of the region map which the map is grouped under. This also determines the name of the map that is display when the player enters it.</p></body></html>
-
-
- true
-
-
-
- -
-
-
- Requires Flash
-
-
-
- -
-
-
- <html><head/><body><p>Whether or not the map is dark and requires Flash to illuminate.</p></body></html>
-
-
-
-
-
-
- -
-
-
- Weather
-
-
-
- -
-
-
- <html><head/><body><p>The default weather for this map.</p></body></html>
-
-
- true
-
-
-
- -
-
-
- Type
-
-
-
- -
-
-
- <html><head/><body><p>The map type is a general attribute, which is used for many different things. For example. it determines whether biking or running is allowed.</p></body></html>
-
-
- true
-
-
-
- -
-
-
- Battle scene
-
-
-
- -
-
-
- <html><head/><body><p>Determines the type of battle scene graphics to use.</p></body></html>
-
-
- true
-
-
-
- -
-
-
- Show Location Name
-
-
-
- -
-
-
- <html><head/><body><p>Whether or not to display the location name when the player enters the map.</p></body></html>
-
-
-
-
-
-
- -
-
-
- Allow Running
-
-
-
- -
-
-
- <html><head/><body><p>Allows the player to use Running Shoes</p></body></html>
-
-
-
-
-
-
- -
-
-
- Allow Biking
-
-
-
- -
-
-
- <html><head/><body><p>Allows the player to use a Bike</p></body></html>
-
-
-
-
-
-
- -
-
-
- Allow Dig & Escape Rope
-
-
-
- -
-
-
- <html><head/><body><p>Allows the player to use Dig or Escape Rope</p></body></html>
-
-
-
-
-
-
- -
-
-
- Floor Number
-
-
-
- -
-
-
- <html><head/><body><p>Floor number to be used for maps with elevators.</p></body></html>
-
-
- -128
-
-
- 127
-
-
-
diff --git a/forms/mapheaderform.ui b/forms/mapheaderform.ui
new file mode 100644
index 00000000..06541e2c
--- /dev/null
+++ b/forms/mapheaderform.ui
@@ -0,0 +1,235 @@
+
+
+ MapHeaderForm
+
+
+
+ 0
+ 0
+ 407
+ 349
+
+
+
+ Form
+
+
+
+ QFormLayout::FieldGrowthPolicy::FieldsStayAtSizeHint
+
+ -
+
+
+ Song
+
+
+
+ -
+
+
+ <html><head/><body><p>The default background music for this map.</p></body></html>
+
+
+ true
+
+
+ QComboBox::InsertPolicy::NoInsert
+
+
+
+ -
+
+
+ Location
+
+
+
+ -
+
+
+ <html><head/><body><p>The section of the region map which the map is grouped under. This also determines the name of the map that is displayed when the player enters it.</p></body></html>
+
+
+ true
+
+
+ QComboBox::InsertPolicy::NoInsert
+
+
+
+ -
+
+
+ Requires Flash
+
+
+
+ -
+
+
+ <html><head/><body><p>If checked, the player will need to use Flash to see fully on this map.</p></body></html>
+
+
+
+
+
+
+ -
+
+
+ Weather
+
+
+
+ -
+
+
+ <html><head/><body><p>The default weather on this map.</p></body></html>
+
+
+ true
+
+
+ QComboBox::InsertPolicy::NoInsert
+
+
+
+ -
+
+
+ Type
+
+
+
+ -
+
+
+ <html><head/><body><p>The map type is a general attribute, which is used for many different things. For example, underground type maps will have a special transition effect when the player enters/exits the map.</p></body></html>
+
+
+ true
+
+
+ QComboBox::InsertPolicy::NoInsert
+
+
+
+ -
+
+
+ Battle Scene
+
+
+
+ -
+
+
+ <html><head/><body><p>This field is used to help determine what graphics to use in the background of battles on this map.</p></body></html>
+
+
+ true
+
+
+ QComboBox::InsertPolicy::NoInsert
+
+
+
+ -
+
+
+ Show Location Name
+
+
+
+ -
+
+
+ <html><head/><body><p>If checked, a map name popup will appear when the player enters this map. The name that appears on this popup depends on the Location field.</p></body></html>
+
+
+
+
+
+
+ -
+
+
+ Allow Running
+
+
+
+ -
+
+
+ <html><head/><body><p>If checked, the player will be allowed to run on this map.</p></body></html>
+
+
+
+
+
+
+ -
+
+
+ Allow Biking
+
+
+
+ -
+
+
+ <html><head/><body><p>If checked, the player will be allowed to get on their bike on this map.</p></body></html>
+
+
+
+
+
+
+ -
+
+
+ Allow Dig & Escape Rope
+
+
+
+ -
+
+
+ <html><head/><body><p>If checked, the player will be allowed to use Dig or Escape Rope on this map.</p></body></html>
+
+
+
+
+
+
+ -
+
+
+ Floor Number
+
+
+
+ -
+
+
+ <html><head/><body><p>Floor number to be used for maps with elevators.</p></body></html>
+
+
+
+
+
+
+
+ NoScrollComboBox
+ QComboBox
+
+
+
+ NoScrollSpinBox
+ QSpinBox
+
+
+
+
+
+
diff --git a/forms/newmapdialog.ui b/forms/newmapdialog.ui
index 9cf4dc18..dcf4f052 100644
--- a/forms/newmapdialog.ui
+++ b/forms/newmapdialog.ui
@@ -7,7 +7,7 @@
0
0
453
- 563
+ 588
@@ -25,7 +25,7 @@
0
0
427
- 841
+ 526
@@ -39,7 +39,14 @@
- -
+
-
+
+
+ ID
+
+
+
+ -
<html><head/><body><p>The name of the new map. The name cannot be the same as any other existing map.</p></body></html>
@@ -49,7 +56,23 @@
- -
+
-
+
+
+ false
+
+
+ color: rgb(255, 0, 0)
+
+
+
+
+
+ true
+
+
+
+ -
Border Dimensions
@@ -104,357 +127,6 @@
- -
-
-
- Map Dimensions
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Width
-
-
-
- -
-
-
- <html><head/><body><p>Width (in metatiles) of the new map.</p></body></html>
-
-
- 1
-
-
-
- -
-
-
- <html><head/><body><p>Height (in metatiles) of the new map.</p></body></html>
-
-
- 1
-
-
-
- -
-
-
- false
-
-
- color: rgb(255, 0, 0)
-
-
-
-
-
- true
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Height
-
-
-
-
-
-
- -
-
-
- <html><head/><body><p>The name of the group this map will be added to.</p></body></html>
-
-
- true
-
-
- QComboBox::InsertPolicy::NoInsert
-
-
-
- -
-
-
- false
-
-
- color: rgb(255, 0, 0)
-
-
-
-
-
- true
-
-
-
- -
-
-
- <html><head/><body><p>The constant that will be used to refer to this map. It cannot be the same as any other existing map, and it must start with the specified prefix.</p></body></html>
-
-
-
- -
-
-
- false
-
-
- color: rgb(255, 0, 0)
-
-
-
-
-
- true
-
-
-
- -
-
-
- Header Data
-
-
-
-
-
-
- Song
-
-
-
- -
-
-
- <html><head/><body><p>The default background music for this map.</p></body></html>
-
-
- true
-
-
- QComboBox::InsertPolicy::NoInsert
-
-
-
- -
-
-
- Location
-
-
-
- -
-
-
- Requires Flash
-
-
-
- -
-
-
- Weather
-
-
-
- -
-
-
- Type
-
-
-
- -
-
-
- <html><head/><body><p>The map type is a general attribute, which is used for many different things. For example, underground type maps will have a special transition effect when the player enters/exits the map.</p></body></html>
-
-
- true
-
-
- QComboBox::InsertPolicy::NoInsert
-
-
-
- -
-
-
- Battle Scene
-
-
-
- -
-
-
- Show Location
-
-
-
- -
-
-
- Allow Running
-
-
-
- -
-
-
- Allow Biking
-
-
-
- -
-
-
- Allow Escaping
-
-
-
- -
-
-
- Floor Number
-
-
-
- -
-
-
- Can Fly To
-
-
-
- -
-
-
- <html><head/><body><p>The section of the region map which the map is grouped under. This also determines the name of the map that is displayed when the player enters it.</p></body></html>
-
-
- true
-
-
- QComboBox::InsertPolicy::NoInsert
-
-
-
- -
-
-
- <html><head/><body><p>Floor number to be used for maps with elevators.</p></body></html>
-
-
- 127
-
-
-
- -
-
-
- <html><head/><body><p>This field is used to help determine what graphics to use in the background of battles on this map.</p></body></html>
-
-
- true
-
-
- QComboBox::InsertPolicy::NoInsert
-
-
-
- -
-
-
- <html><head/><body><p>The default weather on this map.</p></body></html>
-
-
- true
-
-
- QComboBox::InsertPolicy::NoInsert
-
-
-
- -
-
-
- <html><head/><body><p>If checked, the player will need to use Flash to see fully on this map.</p></body></html>
-
-
-
-
-
-
- -
-
-
- <html><head/><body><p>If checked, a map name popup will appear when the player enters this map. The name that appears on this popup depends on the Location field.</p></body></html>
-
-
-
-
-
-
- -
-
-
- <html><head/><body><p>If checked, the player will be allowed to run on this map.</p></body></html>
-
-
-
-
-
-
- -
-
-
- <html><head/><body><p>If checked, the player will be allowed to get on their bike on this map.</p></body></html>
-
-
-
-
-
-
- -
-
-
- <html><head/><body><p>If checked, the player will be allowed to use Dig or Escape Rope on this map.</p></body></html>
-
-
-
-
-
-
- -
-
-
- <html><head/><body><p>If checked, a Heal Location will be added to this map automatically.</p></body></html>
-
-
-
-
-
-
-
-
-
-
@@ -462,14 +134,20 @@
- -
-
-
- ID
+
-
+
+
+ Qt::Orientation::Vertical
-
+
+
+ 20
+ 40
+
+
+
- -
+
-
false
@@ -485,7 +163,14 @@
- -
+
-
+
+
+ Can Fly To
+
+
+
+ -
Tilesets
@@ -550,6 +235,131 @@
+ -
+
+
+ Map Dimensions
+
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Width
+
+
+
+ -
+
+
+ <html><head/><body><p>Width (in metatiles) of the new map.</p></body></html>
+
+
+ 1
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Height
+
+
+
+ -
+
+
+ <html><head/><body><p>Height (in metatiles) of the new map.</p></body></html>
+
+
+ 1
+
+
+
+ -
+
+
+ false
+
+
+ color: rgb(255, 0, 0)
+
+
+
+
+
+ true
+
+
+
+
+
+
+ -
+
+
+ <html><head/><body><p>The constant that will be used to refer to this map. It cannot be the same as any other existing map, and it must start with the specified prefix.</p></body></html>
+
+
+
+ -
+
+
+ false
+
+
+ color: rgb(255, 0, 0)
+
+
+
+
+
+ true
+
+
+
+ -
+
+
+ Header Data
+
+
+
+
+ -
+
+
+ <html><head/><body><p>The name of the group this map will be added to.</p></body></html>
+
+
+ true
+
+
+ QComboBox::InsertPolicy::NoInsert
+
+
+
+ -
+
+
+ <html><head/><body><p>If checked, a Heal Location will be added to this map automatically.</p></body></html>
+
+
+
+
+
+
diff --git a/include/core/map.h b/include/core/map.h
index eab3110e..314013d7 100644
--- a/include/core/map.h
+++ b/include/core/map.h
@@ -62,7 +62,7 @@ public:
void setRequiresFlash(bool requiresFlash);
void setWeather(const QString &weather);
void setType(const QString &type);
- void setShowsLocation(bool showsLocation);
+ void setShowsLocationName(bool showsLocationName);
void setAllowsRunning(bool allowsRunning);
void setAllowsBiking(bool allowsBiking);
void setAllowsEscaping(bool allowsEscaping);
@@ -74,7 +74,7 @@ public:
bool requiresFlash() const { return m_requiresFlash; }
QString weather() const { return m_weather; }
QString type() const { return m_type; }
- bool showsLocation() const { return m_showsLocation; }
+ bool showsLocationName() const { return m_showsLocationName; }
bool allowsRunning() const { return m_allowsRunning; }
bool allowsBiking() const { return m_allowsBiking; }
bool allowsEscaping() const { return m_allowsEscaping; }
@@ -136,7 +136,7 @@ private:
bool m_requiresFlash;
QString m_weather;
QString m_type;
- bool m_showsLocation;
+ bool m_showsLocationName;
bool m_allowsRunning;
bool m_allowsBiking;
bool m_allowsEscaping;
diff --git a/include/mainwindow.h b/include/mainwindow.h
index 2efe964d..ab4e0482 100644
--- a/include/mainwindow.h
+++ b/include/mainwindow.h
@@ -32,6 +32,7 @@
#include "wildmonchart.h"
#include "updatepromoter.h"
#include "aboutporymap.h"
+#include "mapheaderform.h"
@@ -199,17 +200,7 @@ private slots:
void on_actionNew_Tileset_triggered();
void on_action_Save_triggered();
void on_action_Exit_triggered();
- void on_comboBox_Song_currentTextChanged(const QString &arg1);
- void on_comboBox_Location_currentTextChanged(const QString &arg1);
- void on_comboBox_Weather_currentTextChanged(const QString &arg1);
- void on_comboBox_Type_currentTextChanged(const QString &arg1);
- void on_comboBox_BattleScene_currentTextChanged(const QString &arg1);
- void on_comboBox_LayoutSelector_currentTextChanged(const QString &arg1);
- void on_checkBox_ShowLocation_stateChanged(int selected);
- void on_checkBox_AllowRunning_stateChanged(int selected);
- void on_checkBox_AllowBiking_stateChanged(int selected);
- void on_checkBox_AllowEscaping_stateChanged(int selected);
- void on_spinBox_FloorNumber_valueChanged(int offset);
+ void on_comboBox_LayoutSelector_currentTextChanged(const QString &text);
void on_actionShortcuts_triggered();
void on_actionZoom_In_triggered();
@@ -254,7 +245,6 @@ private slots:
void on_comboBox_SecondaryTileset_currentTextChanged(const QString &arg1);
void on_pushButton_ChangeDimensions_clicked();
void on_checkBox_smartPaths_stateChanged(int selected);
- void on_checkBox_Visibility_stateChanged(int selected);
void on_checkBox_ToggleBorder_stateChanged(int selected);
void resetMapViewScale();
@@ -337,6 +327,8 @@ private:
QAction *copyAction = nullptr;
QAction *pasteAction = nullptr;
+ MapHeaderForm *mapHeader = nullptr;
+
QMap lastSelectedEvent;
bool isProgrammaticEventTabChange;
diff --git a/include/ui/mapheaderform.h b/include/ui/mapheaderform.h
new file mode 100644
index 00000000..afdee728
--- /dev/null
+++ b/include/ui/mapheaderform.h
@@ -0,0 +1,56 @@
+#ifndef MAPHEADERFORM_H
+#define MAPHEADERFORM_H
+
+#include "project.h"
+#include "map.h"
+#include "ui_mapheaderform.h"
+
+#include
+
+/*
+ This is the UI class used to edit the fields in a map's header.
+ It's intended to be used anywhere the UI needs to present an editor for a map's header,
+ e.g. for the current map in the main editor or in the new map dialog.
+*/
+
+namespace Ui {
+class MapHeaderForm;
+}
+
+class MapHeaderForm : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit MapHeaderForm(QWidget *parent = nullptr);
+ ~MapHeaderForm();
+
+ void setProject(Project * project);
+ void setMap(Map * map);
+
+ void clearDisplay();
+ void clear();
+
+ void refreshLocationsComboBox();
+
+ Ui::MapHeaderForm *ui;
+
+private:
+ QPointer