Revert unecessary changes and hide Layer Type for Triple Metatile Layers.

This commit is contained in:
ultima-soul 2020-06-25 19:05:10 -07:00 committed by huderlem
parent 8ceb783056
commit 4cc3d60dc4
2 changed files with 53 additions and 45 deletions

View file

@ -233,23 +233,23 @@
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_10"> <layout class="QHBoxLayout" name="horizontalLayout_10">
<item> <item>
<widget class="QTabBar" name="mainTabBar" native="true"/> <widget class="QTabBar" name="mainTabBar" native="true"/>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_20"> <spacer name="horizontalSpacer_20">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QStackedWidget" name="mainStackedWidget"> <widget class="QStackedWidget" name="mainStackedWidget">
@ -263,7 +263,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<property name="movable" stdset="0"> <property name="movable" stdset="0">
<bool>false</bool> <bool>false</bool>
@ -362,8 +362,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>508</width> <width>543</width>
<height>665</height> <height>600</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_8"> <layout class="QGridLayout" name="gridLayout_8">
@ -890,8 +890,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>442</width> <width>443</width>
<height>77</height> <height>74</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_7"> <layout class="QHBoxLayout" name="horizontalLayout_7">
@ -1078,10 +1078,10 @@
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>8</x>
<y>0</y> <y>0</y>
<width>425</width> <width>431</width>
<height>419</height> <height>341</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1496,8 +1496,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>98</width> <width>430</width>
<height>28</height> <height>521</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1541,8 +1541,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>98</width> <width>430</width>
<height>28</height> <height>521</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1586,8 +1586,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>98</width> <width>430</width>
<height>28</height> <height>521</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1631,8 +1631,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>98</width> <width>430</width>
<height>28</height> <height>521</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1676,8 +1676,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>98</width> <width>430</width>
<height>28</height> <height>521</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1727,8 +1727,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>98</width> <width>430</width>
<height>28</height> <height>521</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -2428,8 +2428,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>101</width> <width>118</width>
<height>101</height> <height>118</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_14"> <layout class="QGridLayout" name="gridLayout_14">
@ -2690,7 +2690,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1287</width> <width>1287</width>
<height>21</height> <height>22</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
@ -3040,7 +3040,6 @@
<class>AdjustingStackedWidget</class> <class>AdjustingStackedWidget</class>
<extends>QStackedWidget</extends> <extends>QStackedWidget</extends>
<header>adjustingstackedwidget.h</header> <header>adjustingstackedwidget.h</header>
<container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>GraphicsView</class> <class>GraphicsView</class>

View file

@ -56,9 +56,16 @@ void TilesetEditor::init(Project *project, QString primaryTilesetLabel, QString
for (int num : project->metatileBehaviorMapInverse.keys()) { for (int num : project->metatileBehaviorMapInverse.keys()) {
this->ui->comboBox_metatileBehaviors->addItem(project->metatileBehaviorMapInverse[num], num); this->ui->comboBox_metatileBehaviors->addItem(project->metatileBehaviorMapInverse[num], num);
} }
this->ui->comboBox_layerType->addItem("Normal - Middle/Top", 0);
this->ui->comboBox_layerType->addItem("Covered - Bottom/Middle", 1); if (!projectConfig.getTripleLayerMetatilesEnabled()) {
this->ui->comboBox_layerType->addItem("Split - Bottom/Top", 2); this->ui->comboBox_layerType->addItem("Normal - Middle/Top", 0);
this->ui->comboBox_layerType->addItem("Covered - Bottom/Middle", 1);
this->ui->comboBox_layerType->addItem("Split - Bottom/Top", 2);
} else {
this->ui->comboBox_layerType->setVisible(false);
this->ui->label_layerType->setVisible(false);
}
this->ui->spinBox_paletteSelector->setMinimum(0); this->ui->spinBox_paletteSelector->setMinimum(0);
this->ui->spinBox_paletteSelector->setMaximum(Project::getNumPalettesTotal() - 1); this->ui->spinBox_paletteSelector->setMaximum(Project::getNumPalettesTotal() - 1);
@ -226,7 +233,9 @@ void TilesetEditor::onSelectedMetatileChanged(uint16_t metatileId) {
this->ui->graphicsView_metatileLayers->setFixedSize(this->metatileLayersItem->pixmap().width() + 2, this->metatileLayersItem->pixmap().height() + 2); this->ui->graphicsView_metatileLayers->setFixedSize(this->metatileLayersItem->pixmap().width() + 2, this->metatileLayersItem->pixmap().height() + 2);
this->ui->comboBox_metatileBehaviors->setCurrentIndex(this->ui->comboBox_metatileBehaviors->findData(this->metatile->behavior)); this->ui->comboBox_metatileBehaviors->setCurrentIndex(this->ui->comboBox_metatileBehaviors->findData(this->metatile->behavior));
this->ui->lineEdit_metatileLabel->setText(this->metatile->label); this->ui->lineEdit_metatileLabel->setText(this->metatile->label);
this->ui->comboBox_layerType->setCurrentIndex(this->ui->comboBox_layerType->findData(this->metatile->layerType)); if (!projectConfig.getTripleLayerMetatilesEnabled()) {
this->ui->comboBox_layerType->setCurrentIndex(this->ui->comboBox_layerType->findData(this->metatile->layerType));
}
if (projectConfig.getBaseGameVersion() == BaseGameVersion::pokefirered) { if (projectConfig.getBaseGameVersion() == BaseGameVersion::pokefirered) {
this->ui->comboBox_encounterType->setCurrentIndex(this->ui->comboBox_encounterType->findData(this->metatile->encounterType)); this->ui->comboBox_encounterType->setCurrentIndex(this->ui->comboBox_encounterType->findData(this->metatile->encounterType));
this->ui->comboBox_terrainType->setCurrentIndex(this->ui->comboBox_terrainType->findData(this->metatile->terrainType)); this->ui->comboBox_terrainType->setCurrentIndex(this->ui->comboBox_terrainType->findData(this->metatile->terrainType));