fix region map editor ui
This commit is contained in:
parent
06a3e0049b
commit
d094dced1f
2 changed files with 88 additions and 83 deletions
|
@ -456,84 +456,88 @@
|
|||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>13</x>
|
||||
<y>11</y>
|
||||
<width>281</width>
|
||||
<height>91</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_22">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_RM_MapSection">
|
||||
<property name="text">
|
||||
<string>Map Section</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox_RM_ConnectedMap">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><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></string>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="insertPolicy">
|
||||
<enum>QComboBox::NoInsert</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_RM_MapName">
|
||||
<property name="text">
|
||||
<string>Map Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_RM_MapName"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_RM_CityMap">
|
||||
<property name="text">
|
||||
<string>City Map</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBox_RM_CityMap">
|
||||
<property name="toolTip">
|
||||
<string><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></string>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_RM_Options_delete">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>100</y>
|
||||
<width>113</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delete Square</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_22">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetNoConstraint</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_RM_MapSection">
|
||||
<property name="text">
|
||||
<string>Map Section</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox_RM_ConnectedMap">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><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></string>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="insertPolicy">
|
||||
<enum>QComboBox::NoInsert</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_RM_MapName">
|
||||
<property name="text">
|
||||
<string>Map Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_RM_MapName"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_RM_CityMap">
|
||||
<property name="text">
|
||||
<string>City Map</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBox_RM_CityMap">
|
||||
<property name="toolTip">
|
||||
<string><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></string>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_RM_Options_delete">
|
||||
<property name="text">
|
||||
<string>Delete Square</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -114,7 +114,7 @@ void RegionMapEditor::displayRegionMapImage() {
|
|||
this->ui->graphicsView_Region_Map_BkgImg->setScene(this->scene_region_map_image);
|
||||
|
||||
if (regionMapFirstDraw) {
|
||||
on_verticalSlider_Zoom_Map_Image_valueChanged(initialScale);
|
||||
on_verticalSlider_Zoom_Map_Image_valueChanged(this->ui->verticalSlider_Zoom_Map_Image->value());
|
||||
RegionMapHistoryItem *commit = new RegionMapHistoryItem(
|
||||
RegionMapEditorBox::BackgroundImage, this->region_map->getTiles(), this->region_map->width(), this->region_map->height()
|
||||
);
|
||||
|
@ -141,6 +141,7 @@ void RegionMapEditor::displayRegionMapLayout() {
|
|||
connect(this->region_map_layout_item, &RegionMapLayoutPixmapItem::hoveredTileCleared,
|
||||
this, &RegionMapEditor::onRegionMapLayoutHoveredTileCleared);
|
||||
|
||||
updateRegionMapLayoutOptions(this->currIndex);
|
||||
this->region_map_layout_item->draw();
|
||||
this->region_map_layout_item->select(this->currIndex);
|
||||
|
||||
|
@ -192,7 +193,7 @@ void RegionMapEditor::displayRegionMapTileSelector() {
|
|||
this, &RegionMapEditor::onRegionMapTileSelectorHoveredTileCleared);
|
||||
|
||||
this->ui->graphicsView_RegionMap_Tiles->setScene(this->scene_region_map_tiles);
|
||||
on_verticalSlider_Zoom_Image_Tiles_valueChanged(initialScale);
|
||||
on_verticalSlider_Zoom_Image_Tiles_valueChanged(this->ui->verticalSlider_Zoom_Image_Tiles->value());
|
||||
|
||||
this->mapsquare_selector_item->select(this->selectedImageTile);
|
||||
}
|
||||
|
@ -215,7 +216,7 @@ void RegionMapEditor::displayCityMapTileSelector() {
|
|||
this, &RegionMapEditor::onCityMapTileSelectorSelectedTileChanged);
|
||||
|
||||
this->ui->graphicsView_City_Map_Tiles->setScene(this->scene_city_map_tiles);
|
||||
on_verticalSlider_Zoom_City_Tiles_valueChanged(initialScale);
|
||||
on_verticalSlider_Zoom_City_Tiles_valueChanged(this->ui->verticalSlider_Zoom_City_Tiles->value());
|
||||
|
||||
this->city_map_selector_item->select(this->selectedCityTile);
|
||||
}
|
||||
|
@ -241,7 +242,7 @@ void RegionMapEditor::displayCityMap(QString f) {
|
|||
scene_city_map_image->setSceneRect(this->scene_city_map_image->sceneRect());
|
||||
|
||||
this->ui->graphicsView_City_Map->setScene(scene_city_map_image);
|
||||
on_verticalSlider_Zoom_City_Map_valueChanged(initialScale);
|
||||
on_verticalSlider_Zoom_City_Map_valueChanged(this->ui->verticalSlider_Zoom_City_Map->value());
|
||||
}
|
||||
|
||||
bool RegionMapEditor::createCityMap(QString name) {
|
||||
|
@ -581,7 +582,7 @@ void RegionMapEditor::on_action_Swap_triggered() {
|
|||
|
||||
if (popup.exec() == QDialog::Accepted) {
|
||||
this->region_map->replaceSectionId(oldId, newId);
|
||||
this->region_map_layout_item->draw();
|
||||
displayRegionMapLayout();
|
||||
this->region_map_layout_item->select(this->region_map_layout_item->selectedTile);
|
||||
this->hasUnsavedChanges = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue