Add 'Show Location Name' to newmappopup

This commit is contained in:
BigBahss 2020-08-31 10:19:58 -04:00 committed by garak
parent 68098b8220
commit cfbcb8b623
2 changed files with 45 additions and 18 deletions

View file

@ -87,14 +87,14 @@
</property>
</widget>
</item>
<item row="4" column="0">
<item row="3" column="0">
<widget class="QLabel" name="label_NewMap_Height">
<property name="text">
<string>Map Height</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="3" column="1">
<widget class="QSpinBox" name="spinBox_NewMap_Height">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Height (in blocks) of the new map.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -104,14 +104,14 @@
</property>
</widget>
</item>
<item row="5" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label_NewMap_BorderWidth">
<property name="text">
<string>Border Width</string>
</property>
</widget>
</item>
<item row="5" column="1">
<item row="4" column="1">
<widget class="QSpinBox" name="spinBox_NewMap_BorderWidth">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Width (in blocks) of the new map's border.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -121,14 +121,14 @@
</property>
</widget>
</item>
<item row="6" column="0">
<item row="5" column="0">
<widget class="QLabel" name="label_NewMap_BorderHeight">
<property name="text">
<string>Border Height</string>
</property>
</widget>
</item>
<item row="6" column="1">
<item row="5" column="1">
<widget class="QSpinBox" name="spinBox_NewMap_BorderHeight">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Height (in blocks) of the new map's border.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -138,14 +138,14 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="6" column="0">
<widget class="QLabel" name="label_NewMap_Primary_Tileset">
<property name="text">
<string>Primary Tileset</string>
</property>
</widget>
</item>
<item row="7" column="1">
<item row="6" column="1">
<widget class="NoScrollComboBox" name="comboBox_NewMap_Primary_Tileset">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The primary tileset for the new map.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -155,14 +155,14 @@
</property>
</widget>
</item>
<item row="8" column="0">
<item row="7" column="0">
<widget class="QLabel" name="label_NewMap_Secondary_Tileset">
<property name="text">
<string>Secondary Tileset</string>
</property>
</widget>
</item>
<item row="8" column="1">
<item row="7" column="1">
<widget class="NoScrollComboBox" name="comboBox_NewMap_Secondary_Tileset">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The secondary tileset for the new map.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -172,14 +172,14 @@
</property>
</widget>
</item>
<item row="9" column="0">
<item row="8" column="0">
<widget class="QLabel" name="label_NewMap_Type">
<property name="text">
<string>Type</string>
</property>
</widget>
</item>
<item row="9" column="1">
<item row="8" column="1">
<widget class="NoScrollComboBox" name="comboBox_NewMap_Type">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The map type is a general attribute, which is used for many different things. For example. it determines whether biking or running is allowed.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -189,14 +189,14 @@
</property>
</widget>
</item>
<item row="10" column="0">
<item row="9" column="0">
<widget class="QLabel" name="label_NewMap_Location">
<property name="text">
<string>Location</string>
</property>
</widget>
</item>
<item row="10" column="1">
<item row="9" column="1">
<widget class="NoScrollComboBox" name="comboBox_NewMap_Location">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -206,14 +206,14 @@
</property>
</widget>
</item>
<item row="11" column="0">
<item row="10" column="0">
<widget class="QLabel" name="label_NewMap_Flyable">
<property name="text">
<string>Can Fly To</string>
</property>
</widget>
</item>
<item row="11" column="1">
<item row="10" column="1">
<widget class="QCheckBox" name="checkBox_NewMap_Flyable">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Whether to add a heal location to the new map.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -223,6 +223,23 @@
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_NewMap_Show_Location">
<property name="text">
<string>Show Location Name</string>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QCheckBox" name="checkBox_NewMap_Show_Location">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Whether or not to display the location name when the player enters the map.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_NewMap_Allow_Running">
<property name="text">
@ -232,6 +249,9 @@
</item>
<item row="12" column="1">
<widget class="QCheckBox" name="checkBox_NewMap_Allow_Running">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Allows the player to use Running Shoes&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
@ -246,6 +266,9 @@
</item>
<item row="13" column="1">
<widget class="QCheckBox" name="checkBox_NewMap_Allow_Biking">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Allows the player to use a Bike&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
@ -254,12 +277,15 @@
<item row="14" column="0">
<widget class="QLabel" name="label_NewMap_Allow_Escape_Rope">
<property name="text">
<string>Allow Escape Rope</string>
<string>Allow Dig &amp; Escape Rope</string>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QCheckBox" name="checkBox_NewMap_Allow_Escape_Rope">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Allows the player to use Dig or Escape Rope&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>

View file

@ -113,6 +113,7 @@ void NewMapPopup::setDefaultValues(int groupNum, QString mapSec) {
ui->comboBox_NewMap_Type->addItems(*project->mapTypes);
ui->comboBox_NewMap_Location->addItems(project->mapSectionValueToName.values());
if (!mapSec.isEmpty()) ui->comboBox_NewMap_Location->setCurrentText(mapSec);
ui->checkBox_NewMap_Show_Location->setChecked(true);
ui->frame_NewMap_Options->setEnabled(true);
@ -195,7 +196,7 @@ void NewMapPopup::on_pushButton_NewMap_Accept_clicked() {
newMap->song = this->project->defaultSong;
newMap->requiresFlash = "0";
newMap->weather = this->project->weatherNames->value(0, "WEATHER_NONE");
newMap->show_location = "1";
newMap->show_location = this->ui->checkBox_NewMap_Show_Location->isChecked() ? "1" : "0";
newMap->battle_scene = this->project->mapBattleScenes->value(0, "MAP_BATTLE_SCENE_NORMAL");
if (this->existingLayout) {