Merge branch 'master' of https://github.com/huderlem/porymap into slam
This commit is contained in:
commit
0296c22845
11 changed files with 678 additions and 579 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -8,19 +8,27 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
|
- Add zoom sliders to the Tileset Editor.
|
||||||
- Add `getMetatileBehaviorName` and `setMetatileBehaviorName` to the API.
|
- Add `getMetatileBehaviorName` and `setMetatileBehaviorName` to the API.
|
||||||
- Add `metatile_behaviors`, `num_primary_palettes`, and `num_secondary_palettes` to `constants` in the API.
|
- Add `metatile_behaviors`, `num_primary_palettes`, and `num_secondary_palettes` to `constants` in the API.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Metatile ID strings are now padded to their current max, not the overall max.
|
- Metatile ID strings are now padded to their current max, not the overall max.
|
||||||
|
- Non-existent directories are now removed from the Open Recent Project menu.
|
||||||
|
- Hovering on the layer view in the Tileset Editor now displays the tile ID.
|
||||||
|
- Labels in the Script dropdown are now sorted alphabetically.
|
||||||
- The name of the Heal Locations table is no longer enforced.
|
- The name of the Heal Locations table is no longer enforced.
|
||||||
- The API functions `addImage` and `createImage` now support project-relative paths.
|
- The API functions `addImage` and `createImage` now support project-relative paths.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix the metatile selector rectangle jumping when selecting up or left of the origin.
|
- Fix the metatile selector rectangle jumping when selecting up or left of the origin.
|
||||||
- Fix the event group tabs sometimes showing an event from the wrong group
|
- Fix the event group tabs sometimes showing an event from the wrong group.
|
||||||
- Fix the clear buttons in the Shortcuts Editor not actually removing shortcuts.
|
- Fix the clear buttons in the Shortcuts Editor not actually removing shortcuts.
|
||||||
- Fix API error reporting
|
- Fix slow speed for the script label autcomplete.
|
||||||
|
- Fix deleted script labels still appearing in the autocomplete after project reload.
|
||||||
|
- Fix the map search bar stealing focus on startup.
|
||||||
|
- Fix Open Recent Project not clearing the API overlay
|
||||||
|
- Fix API error reporting.
|
||||||
|
|
||||||
## [5.2.0] - 2024-01-02
|
## [5.2.0] - 2024-01-02
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -19,35 +19,54 @@
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QScrollArea" name="scrollArea_Metatiles">
|
<widget class="QSplitter" name="splitter">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="childrenCollapsible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QFrame" name="frame_Metatiles">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>1</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="frameShape">
|
||||||
<size>
|
<enum>QFrame::NoFrame</enum>
|
||||||
<width>274</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="frameShadow">
|
||||||
<size>
|
<enum>QFrame::Plain</enum>
|
||||||
<width>274</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QScrollArea" name="scrollArea_Metatiles">
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>272</width>
|
<width>223</width>
|
||||||
<height>625</height>
|
<height>593</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
@ -66,33 +85,7 @@
|
||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="2">
|
<item row="1" column="1">
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -105,7 +98,7 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QGraphicsView" name="graphicsView_Metatiles">
|
<widget class="QGraphicsView" name="graphicsView_Metatiles">
|
||||||
<property name="verticalScrollBarPolicy">
|
<property name="verticalScrollBarPolicy">
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
@ -115,15 +108,28 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="0">
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="horizontalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>40</width>
|
||||||
<height>40</height>
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
|
@ -133,7 +139,21 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame_2">
|
<widget class="QSlider" name="horizontalSlider_MetatilesZoom">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QFrame" name="frame_Editing">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -153,8 +173,14 @@
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item alignment="Qt::AlignTop">
|
<item>
|
||||||
<widget class="QFrame" name="frame_4">
|
<widget class="QFrame" name="frame_Properties">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
@ -184,13 +210,7 @@
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_MetatileProperties">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Metatile Properties</string>
|
<string>Metatile Properties</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -201,33 +221,6 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="1" column="1" colspan="3">
|
|
||||||
<widget class="NoScrollComboBox" name="comboBox_layerType"/>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0" colspan="4">
|
|
||||||
<widget class="NoScrollComboBox" name="comboBox_metatileBehaviors"/>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="0" colspan="3">
|
|
||||||
<widget class="QLineEdit" name="lineEdit_metatileLabel">
|
|
||||||
<property name="clearButtonEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="0" colspan="3">
|
|
||||||
<widget class="QLabel" name="label_metatileLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Metatile Label (Optional)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="3">
|
|
||||||
<widget class="QLabel" name="label_metatileBehavior">
|
|
||||||
<property name="text">
|
|
||||||
<string>Metatile Behavior</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QGraphicsView" name="graphicsView_metatileLayers">
|
<widget class="QGraphicsView" name="graphicsView_metatileLayers">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -244,7 +237,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>66</width>
|
<width>96</width>
|
||||||
<height>34</height>
|
<height>34</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
@ -256,38 +249,47 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="11" column="0" colspan="5">
|
||||||
<widget class="QLabel" name="label_BottomTop">
|
<widget class="NoScrollComboBox" name="comboBox_terrainType">
|
||||||
<property name="text">
|
<property name="sizePolicy">
|
||||||
<string>Bottom/Top</string>
|
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="14" column="0">
|
||||||
<widget class="QLabel" name="label_encounterType">
|
<spacer name="verticalSpacer_7">
|
||||||
<property name="text">
|
<property name="orientation">
|
||||||
<string>Encounter Type</string>
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0" colspan="5">
|
||||||
|
<widget class="NoScrollComboBox" name="comboBox_encounterType">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0">
|
<item row="12" column="0" colspan="5">
|
||||||
<widget class="QLabel" name="label_terrainType">
|
<widget class="QLabel" name="label_metatileLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Terrain Type</string>
|
<string>Metatile Label (Optional)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="0">
|
<item row="13" column="4">
|
||||||
<widget class="NoScrollComboBox" name="comboBox_terrainType"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLabel" name="label_layerType">
|
|
||||||
<property name="text">
|
|
||||||
<string>Layer Type</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="3">
|
|
||||||
<widget class="QToolButton" name="copyButton_metatileLabel">
|
<widget class="QToolButton" name="copyButton_metatileLabel">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Copies the full metatile label to the clipboard.</p></body></html></string>
|
<string><html><head/><body><p>Copies the full metatile label to the clipboard.</p></body></html></string>
|
||||||
|
@ -301,14 +303,95 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="1" column="2" colspan="3">
|
||||||
<widget class="NoScrollComboBox" name="comboBox_encounterType"/>
|
<widget class="NoScrollComboBox" name="comboBox_layerType">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>185</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0" colspan="5">
|
||||||
|
<widget class="NoScrollComboBox" name="comboBox_metatileBehaviors">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" colspan="3">
|
||||||
|
<widget class="QLabel" name="label_layerType">
|
||||||
|
<property name="text">
|
||||||
|
<string>Layer Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="0" colspan="4">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_metatileLabel">
|
||||||
|
<property name="clearButtonEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="5">
|
||||||
|
<widget class="QLabel" name="label_metatileBehavior">
|
||||||
|
<property name="text">
|
||||||
|
<string>Metatile Behavior</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<spacer name="horizontalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Maximum</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0" colspan="5">
|
||||||
|
<widget class="QLabel" name="label_encounterType">
|
||||||
|
<property name="text">
|
||||||
|
<string>Encounter Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0" colspan="5">
|
||||||
|
<widget class="QLabel" name="label_terrainType">
|
||||||
|
<property name="text">
|
||||||
|
<string>Terrain Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_BottomTop">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bottom/Top</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox_TileProperties">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -330,14 +413,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QSpinBox" name="spinBox_paletteSelector">
|
<widget class="QSpinBox" name="spinBox_paletteSelector"/>
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
|
@ -370,8 +446,24 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>5</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame_SelectedTile">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -380,7 +472,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>98</width>
|
||||||
<height>62</height>
|
<height>62</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
@ -426,7 +518,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>66</width>
|
<width>98</width>
|
||||||
<height>34</height>
|
<height>34</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
@ -444,19 +536,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2">
|
|
||||||
<spacer name="verticalSpacer_5">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0" colspan="2">
|
<item row="6" column="0" colspan="2">
|
||||||
<spacer name="verticalSpacer_6">
|
<spacer name="verticalSpacer_6">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -478,22 +557,19 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QScrollArea" name="scrollArea_Tiles">
|
<widget class="QScrollArea" name="scrollArea_Tiles">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>411</width>
|
<width>455</width>
|
||||||
<height>272</height>
|
<height>232</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
@ -509,33 +585,7 @@
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="1">
|
<item row="0" column="2">
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<spacer name="verticalSpacer_4">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<spacer name="horizontalSpacer_4">
|
<spacer name="horizontalSpacer_4">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
@ -548,7 +598,7 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QGraphicsView" name="graphicsView_Tiles">
|
<widget class="QGraphicsView" name="graphicsView_Tiles">
|
||||||
<property name="verticalScrollBarPolicy">
|
<property name="verticalScrollBarPolicy">
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
@ -558,7 +608,20 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="1">
|
||||||
|
<spacer name="verticalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
<spacer name="horizontalSpacer_3">
|
<spacer name="horizontalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
@ -575,8 +638,16 @@
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="horizontalSlider_TilesZoom">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -58,6 +58,8 @@ public:
|
||||||
this->collisionOpacity = 50;
|
this->collisionOpacity = 50;
|
||||||
this->collisionZoom = 30;
|
this->collisionZoom = 30;
|
||||||
this->metatilesZoom = 30;
|
this->metatilesZoom = 30;
|
||||||
|
this->tilesetEditorMetatilesZoom = 30;
|
||||||
|
this->tilesetEditorTilesZoom = 30;
|
||||||
this->showPlayerView = false;
|
this->showPlayerView = false;
|
||||||
this->showCursorTile = true;
|
this->showCursorTile = true;
|
||||||
this->showBorder = true;
|
this->showBorder = true;
|
||||||
|
@ -87,6 +89,8 @@ public:
|
||||||
void setCollisionOpacity(int opacity);
|
void setCollisionOpacity(int opacity);
|
||||||
void setCollisionZoom(int zoom);
|
void setCollisionZoom(int zoom);
|
||||||
void setMetatilesZoom(int zoom);
|
void setMetatilesZoom(int zoom);
|
||||||
|
void setTilesetEditorMetatilesZoom(int zoom);
|
||||||
|
void setTilesetEditorTilesZoom(int zoom);
|
||||||
void setShowPlayerView(bool enabled);
|
void setShowPlayerView(bool enabled);
|
||||||
void setShowCursorTile(bool enabled);
|
void setShowCursorTile(bool enabled);
|
||||||
void setShowBorder(bool enabled);
|
void setShowBorder(bool enabled);
|
||||||
|
@ -115,6 +119,8 @@ public:
|
||||||
int getCollisionOpacity();
|
int getCollisionOpacity();
|
||||||
int getCollisionZoom();
|
int getCollisionZoom();
|
||||||
int getMetatilesZoom();
|
int getMetatilesZoom();
|
||||||
|
int getTilesetEditorMetatilesZoom();
|
||||||
|
int getTilesetEditorTilesZoom();
|
||||||
bool getShowPlayerView();
|
bool getShowPlayerView();
|
||||||
bool getShowCursorTile();
|
bool getShowCursorTile();
|
||||||
bool getShowBorder();
|
bool getShowBorder();
|
||||||
|
@ -160,6 +166,8 @@ private:
|
||||||
int collisionOpacity;
|
int collisionOpacity;
|
||||||
int collisionZoom;
|
int collisionZoom;
|
||||||
int metatilesZoom;
|
int metatilesZoom;
|
||||||
|
int tilesetEditorMetatilesZoom;
|
||||||
|
int tilesetEditorTilesZoom;
|
||||||
bool showPlayerView;
|
bool showPlayerView;
|
||||||
bool showCursorTile;
|
bool showCursorTile;
|
||||||
bool showBorder;
|
bool showBorder;
|
||||||
|
|
|
@ -205,8 +205,6 @@ public:
|
||||||
static QString getScriptFileExtension(bool usePoryScript);
|
static QString getScriptFileExtension(bool usePoryScript);
|
||||||
QString getScriptDefaultString(bool usePoryScript, QString mapName) const;
|
QString getScriptDefaultString(bool usePoryScript, QString mapName) const;
|
||||||
QStringList getEventScriptsFilePaths() const;
|
QStringList getEventScriptsFilePaths() const;
|
||||||
QCompleter *getEventScriptLabelCompleter(QStringList additionalScriptLabels);
|
|
||||||
QStringList getGlobalScriptLabels();
|
|
||||||
|
|
||||||
QString getDefaultPrimaryTilesetLabel();
|
QString getDefaultPrimaryTilesetLabel();
|
||||||
QString getDefaultSecondaryTilesetLabel();
|
QString getDefaultSecondaryTilesetLabel();
|
||||||
|
@ -256,9 +254,6 @@ private:
|
||||||
static int default_map_size;
|
static int default_map_size;
|
||||||
static int max_object_events;
|
static int max_object_events;
|
||||||
|
|
||||||
QStringListModel eventScriptLabelModel;
|
|
||||||
QCompleter eventScriptLabelCompleter;
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void reloadProject();
|
void reloadProject();
|
||||||
void uncheckMonitorFilesAction();
|
void uncheckMonitorFilesAction();
|
||||||
|
|
|
@ -31,6 +31,8 @@ public:
|
||||||
void invalidateUi();
|
void invalidateUi();
|
||||||
void invalidateValues();
|
void invalidateValues();
|
||||||
|
|
||||||
|
void populateScriptDropdown(NoScrollComboBox * combo, Project * project);
|
||||||
|
|
||||||
virtual void setActive(bool active);
|
virtual void setActive(bool active);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -87,8 +89,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ObjectEvent *object;
|
ObjectEvent *object;
|
||||||
|
|
||||||
QCompleter *scriptCompleter = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -158,8 +158,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TriggerEvent *trigger;
|
TriggerEvent *trigger;
|
||||||
|
|
||||||
QCompleter *scriptCompleter = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,8 +201,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SignEvent *sign;
|
SignEvent *sign;
|
||||||
|
|
||||||
QCompleter *scriptCompleter = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -116,6 +116,8 @@ private slots:
|
||||||
void on_actionCut_triggered();
|
void on_actionCut_triggered();
|
||||||
void on_actionCopy_triggered();
|
void on_actionCopy_triggered();
|
||||||
void on_actionPaste_triggered();
|
void on_actionPaste_triggered();
|
||||||
|
void on_horizontalSlider_MetatilesZoom_valueChanged(int value);
|
||||||
|
void on_horizontalSlider_TilesZoom_valueChanged(int value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initUi();
|
void initUi();
|
||||||
|
|
|
@ -368,6 +368,10 @@ void PorymapConfig::parseConfigKeyValue(QString key, QString value) {
|
||||||
this->metatilesZoom = getConfigInteger(key, value, 10, 100, 30);
|
this->metatilesZoom = getConfigInteger(key, value, 10, 100, 30);
|
||||||
} else if (key == "collision_zoom") {
|
} else if (key == "collision_zoom") {
|
||||||
this->collisionZoom = getConfigInteger(key, value, 10, 100, 30);
|
this->collisionZoom = getConfigInteger(key, value, 10, 100, 30);
|
||||||
|
} else if (key == "tileset_editor_metatiles_zoom") {
|
||||||
|
this->tilesetEditorMetatilesZoom = getConfigInteger(key, value, 10, 100, 30);
|
||||||
|
} else if (key == "tileset_editor_tiles_zoom") {
|
||||||
|
this->tilesetEditorTilesZoom = getConfigInteger(key, value, 10, 100, 30);
|
||||||
} else if (key == "show_player_view") {
|
} else if (key == "show_player_view") {
|
||||||
this->showPlayerView = getConfigBool(key, value);
|
this->showPlayerView = getConfigBool(key, value);
|
||||||
} else if (key == "show_cursor_tile") {
|
} else if (key == "show_cursor_tile") {
|
||||||
|
@ -427,6 +431,8 @@ QMap<QString, QString> PorymapConfig::getKeyValueMap() {
|
||||||
map.insert("collision_opacity", QString::number(this->collisionOpacity));
|
map.insert("collision_opacity", QString::number(this->collisionOpacity));
|
||||||
map.insert("collision_zoom", QString::number(this->collisionZoom));
|
map.insert("collision_zoom", QString::number(this->collisionZoom));
|
||||||
map.insert("metatiles_zoom", QString::number(this->metatilesZoom));
|
map.insert("metatiles_zoom", QString::number(this->metatilesZoom));
|
||||||
|
map.insert("tileset_editor_metatiles_zoom", QString::number(this->tilesetEditorMetatilesZoom));
|
||||||
|
map.insert("tileset_editor_tiles_zoom", QString::number(this->tilesetEditorTilesZoom));
|
||||||
map.insert("show_player_view", this->showPlayerView ? "1" : "0");
|
map.insert("show_player_view", this->showPlayerView ? "1" : "0");
|
||||||
map.insert("show_cursor_tile", this->showCursorTile ? "1" : "0");
|
map.insert("show_cursor_tile", this->showCursorTile ? "1" : "0");
|
||||||
map.insert("show_border", this->showBorder ? "1" : "0");
|
map.insert("show_border", this->showBorder ? "1" : "0");
|
||||||
|
@ -552,6 +558,16 @@ void PorymapConfig::setMetatilesZoom(int zoom) {
|
||||||
// don't auto-save here because this can be called very frequently.
|
// don't auto-save here because this can be called very frequently.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PorymapConfig::setTilesetEditorMetatilesZoom(int zoom) {
|
||||||
|
this->tilesetEditorMetatilesZoom = zoom;
|
||||||
|
// don't auto-save here because this can be called very frequently.
|
||||||
|
}
|
||||||
|
|
||||||
|
void PorymapConfig::setTilesetEditorTilesZoom(int zoom) {
|
||||||
|
this->tilesetEditorTilesZoom = zoom;
|
||||||
|
// don't auto-save here because this can be called very frequently.
|
||||||
|
}
|
||||||
|
|
||||||
void PorymapConfig::setShowPlayerView(bool enabled) {
|
void PorymapConfig::setShowPlayerView(bool enabled) {
|
||||||
this->showPlayerView = enabled;
|
this->showPlayerView = enabled;
|
||||||
this->save();
|
this->save();
|
||||||
|
@ -694,6 +710,14 @@ int PorymapConfig::getMetatilesZoom() {
|
||||||
return this->metatilesZoom;
|
return this->metatilesZoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int PorymapConfig::getTilesetEditorMetatilesZoom() {
|
||||||
|
return this->tilesetEditorMetatilesZoom;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PorymapConfig::getTilesetEditorTilesZoom() {
|
||||||
|
return this->tilesetEditorTilesZoom;
|
||||||
|
}
|
||||||
|
|
||||||
bool PorymapConfig::getShowPlayerView() {
|
bool PorymapConfig::getShowPlayerView() {
|
||||||
return this->showPlayerView;
|
return this->showPlayerView;
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,6 +137,7 @@ QStringList Map::getScriptLabels(Event::Group group) const {
|
||||||
|
|
||||||
// Add scripts from map's scripts file, and empty names.
|
// Add scripts from map's scripts file, and empty names.
|
||||||
scriptLabels.append(scriptsFileLabels);
|
scriptLabels.append(scriptsFileLabels);
|
||||||
|
scriptLabels.sort(Qt::CaseInsensitive);
|
||||||
scriptLabels.prepend("0x0");
|
scriptLabels.prepend("0x0");
|
||||||
scriptLabels.prepend("NULL");
|
scriptLabels.prepend("NULL");
|
||||||
|
|
||||||
|
|
|
@ -2454,18 +2454,13 @@ bool Project::readMiscellaneousConstants() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList Project::getGlobalScriptLabels() {
|
|
||||||
return this->eventScriptLabelModel.stringList();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Project::readEventScriptLabels() {
|
bool Project::readEventScriptLabels() {
|
||||||
|
globalScriptLabels.clear();
|
||||||
for (const auto &filePath : getEventScriptsFilePaths())
|
for (const auto &filePath : getEventScriptsFilePaths())
|
||||||
globalScriptLabels << ParseUtil::getGlobalScriptLabels(filePath);
|
globalScriptLabels << ParseUtil::getGlobalScriptLabels(filePath);
|
||||||
|
|
||||||
eventScriptLabelModel.setStringList(globalScriptLabels);
|
globalScriptLabels.sort(Qt::CaseInsensitive);
|
||||||
eventScriptLabelCompleter.setModel(&eventScriptLabelModel);
|
globalScriptLabels.removeDuplicates();
|
||||||
eventScriptLabelCompleter.setCaseSensitivity(Qt::CaseInsensitive);
|
|
||||||
eventScriptLabelCompleter.setFilterMode(Qt::MatchContains);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2526,13 +2521,6 @@ QStringList Project::getEventScriptsFilePaths() const {
|
||||||
return filePaths;
|
return filePaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
QCompleter *Project::getEventScriptLabelCompleter(QStringList additionalScriptLabels) {
|
|
||||||
additionalScriptLabels << globalScriptLabels;
|
|
||||||
additionalScriptLabels.removeDuplicates();
|
|
||||||
eventScriptLabelModel.setStringList(additionalScriptLabels);
|
|
||||||
return &eventScriptLabelCompleter;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Project::setEventPixmap(Event *event, bool forceLoad) {
|
void Project::setEventPixmap(Event *event, bool forceLoad) {
|
||||||
if (event && (event->getPixmap().isNull() || forceLoad))
|
if (event && (event->getPixmap().isNull() || forceLoad))
|
||||||
event->loadPixmap(this);
|
event->loadPixmap(this);
|
||||||
|
|
|
@ -168,6 +168,23 @@ void EventFrame::setActive(bool active) {
|
||||||
this->blockSignals(!active);
|
this->blockSignals(!active);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventFrame::populateScriptDropdown(NoScrollComboBox * combo, Project * project) {
|
||||||
|
// The script dropdown is populated with scripts used by the map's events and from its scripts file.
|
||||||
|
if (this->event->getMap())
|
||||||
|
combo->addItems(this->event->getMap()->getScriptLabels());
|
||||||
|
|
||||||
|
// The dropdown's autocomplete has all script labels across the full project.
|
||||||
|
auto completer = new QCompleter(project->globalScriptLabels, combo);
|
||||||
|
completer->setCaseSensitivity(Qt::CaseInsensitive);
|
||||||
|
completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel);
|
||||||
|
completer->setFilterMode(Qt::MatchContains);
|
||||||
|
|
||||||
|
// Improve display speed for the autocomplete popup
|
||||||
|
auto popup = (QListView *)completer->popup();
|
||||||
|
if (popup) popup->setUniformItemSizes(true);
|
||||||
|
|
||||||
|
combo->setCompleter(completer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ObjectFrame::setup() {
|
void ObjectFrame::setup() {
|
||||||
|
@ -367,20 +384,7 @@ void ObjectFrame::populate(Project *project) {
|
||||||
this->combo_flag->addItems(project->flagNames);
|
this->combo_flag->addItems(project->flagNames);
|
||||||
this->combo_trainer_type->addItems(project->trainerTypes);
|
this->combo_trainer_type->addItems(project->trainerTypes);
|
||||||
|
|
||||||
// The script dropdown is populated with scripts used by the map's events and from its scripts file.
|
this->populateScriptDropdown(this->combo_script, project);
|
||||||
QStringList scriptLabels;
|
|
||||||
if (this->object->getMap()) {
|
|
||||||
scriptLabels.append(this->object->getMap()->getScriptLabels());
|
|
||||||
this->combo_script->addItems(scriptLabels);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The dropdown's autocomplete has all script labels across the full project.
|
|
||||||
scriptLabels.append(project->getGlobalScriptLabels());
|
|
||||||
scriptLabels.removeDuplicates();
|
|
||||||
this->scriptCompleter = new QCompleter(scriptLabels, this);
|
|
||||||
this->scriptCompleter->setCaseSensitivity(Qt::CaseInsensitive);
|
|
||||||
this->scriptCompleter->setFilterMode(Qt::MatchContains);
|
|
||||||
this->combo_script->setCompleter(this->scriptCompleter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -637,20 +641,7 @@ void TriggerFrame::populate(Project *project) {
|
||||||
// var combo
|
// var combo
|
||||||
this->combo_var->addItems(project->varNames);
|
this->combo_var->addItems(project->varNames);
|
||||||
|
|
||||||
// The script dropdown is populated with scripts used by the map's events and from its scripts file.
|
this->populateScriptDropdown(this->combo_script, project);
|
||||||
QStringList scriptLabels;
|
|
||||||
if (this->trigger->getMap()) {
|
|
||||||
scriptLabels.append(this->trigger->getMap()->getScriptLabels());
|
|
||||||
this->combo_script->addItems(scriptLabels);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The dropdown's autocomplete has all script labels across the full project.
|
|
||||||
scriptLabels.append(project->getGlobalScriptLabels());
|
|
||||||
scriptLabels.removeDuplicates();
|
|
||||||
this->scriptCompleter = new QCompleter(scriptLabels, this);
|
|
||||||
this->scriptCompleter->setCaseSensitivity(Qt::CaseInsensitive);
|
|
||||||
this->scriptCompleter->setFilterMode(Qt::MatchContains);
|
|
||||||
this->combo_script->setCompleter(this->scriptCompleter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -772,20 +763,7 @@ void SignFrame::populate(Project *project) {
|
||||||
// facing dir
|
// facing dir
|
||||||
this->combo_facing_dir->addItems(project->bgEventFacingDirections);
|
this->combo_facing_dir->addItems(project->bgEventFacingDirections);
|
||||||
|
|
||||||
// The script dropdown is populated with scripts used by the map's events and from its scripts file.
|
this->populateScriptDropdown(this->combo_script, project);
|
||||||
QStringList scriptLabels;
|
|
||||||
if (this->sign->getMap()) {
|
|
||||||
scriptLabels.append(this->sign->getMap()->getScriptLabels());
|
|
||||||
this->combo_script->addItems(scriptLabels);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The dropdown's autocomplete has all script labels across the full project.
|
|
||||||
scriptLabels.append(project->getGlobalScriptLabels());
|
|
||||||
scriptLabels.removeDuplicates();
|
|
||||||
this->scriptCompleter = new QCompleter(scriptLabels, this);
|
|
||||||
this->scriptCompleter->setCaseSensitivity(Qt::CaseInsensitive);
|
|
||||||
this->scriptCompleter->setFilterMode(Qt::MatchContains);
|
|
||||||
this->combo_script->setCompleter(this->scriptCompleter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ void TilesetEditor::initMetatileSelector()
|
||||||
this->metatileSelector->draw();
|
this->metatileSelector->draw();
|
||||||
|
|
||||||
this->ui->graphicsView_Metatiles->setScene(this->metatilesScene);
|
this->ui->graphicsView_Metatiles->setScene(this->metatilesScene);
|
||||||
this->ui->graphicsView_Metatiles->setFixedSize(this->metatileSelector->pixmap().width() + 2, this->metatileSelector->pixmap().height() + 2);
|
this->ui->horizontalSlider_MetatilesZoom->setValue(porymapConfig.getTilesetEditorMetatilesZoom());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TilesetEditor::initMetatileLayersItem() {
|
void TilesetEditor::initMetatileLayersItem() {
|
||||||
|
@ -236,7 +236,7 @@ void TilesetEditor::initTileSelector()
|
||||||
this->tileSelector->draw();
|
this->tileSelector->draw();
|
||||||
|
|
||||||
this->ui->graphicsView_Tiles->setScene(this->tilesScene);
|
this->ui->graphicsView_Tiles->setScene(this->tilesScene);
|
||||||
this->ui->graphicsView_Tiles->setFixedSize(this->tileSelector->pixmap().width() + 2, this->tileSelector->pixmap().height() + 2);
|
this->ui->horizontalSlider_TilesZoom->setValue(porymapConfig.getTilesetEditorTilesZoom());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TilesetEditor::initSelectedTileItem() {
|
void TilesetEditor::initSelectedTileItem() {
|
||||||
|
@ -1182,3 +1182,31 @@ void TilesetEditor::on_copyButton_metatileLabel_clicked() {
|
||||||
QGuiApplication::clipboard()->setText(label);
|
QGuiApplication::clipboard()->setText(label);
|
||||||
QToolTip::showText(this->ui->copyButton_metatileLabel->mapToGlobal(QPoint(0, 0)), "Copied!");
|
QToolTip::showText(this->ui->copyButton_metatileLabel->mapToGlobal(QPoint(0, 0)), "Copied!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TilesetEditor::on_horizontalSlider_MetatilesZoom_valueChanged(int value) {
|
||||||
|
porymapConfig.setTilesetEditorMetatilesZoom(value);
|
||||||
|
double scale = pow(3.0, static_cast<double>(value - 30) / 30.0);
|
||||||
|
|
||||||
|
QTransform transform;
|
||||||
|
transform.scale(scale, scale);
|
||||||
|
QSize size(this->metatileSelector->pixmap().width(), this->metatileSelector->pixmap().height());
|
||||||
|
size *= scale;
|
||||||
|
|
||||||
|
this->ui->graphicsView_Metatiles->setResizeAnchor(QGraphicsView::NoAnchor);
|
||||||
|
this->ui->graphicsView_Metatiles->setTransform(transform);
|
||||||
|
this->ui->graphicsView_Metatiles->setFixedSize(size.width() + 2, size.height() + 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TilesetEditor::on_horizontalSlider_TilesZoom_valueChanged(int value) {
|
||||||
|
porymapConfig.setTilesetEditorTilesZoom(value);
|
||||||
|
double scale = pow(3.0, static_cast<double>(value - 30) / 30.0);
|
||||||
|
|
||||||
|
QTransform transform;
|
||||||
|
transform.scale(scale, scale);
|
||||||
|
QSize size(this->tileSelector->pixmap().width(), this->tileSelector->pixmap().height());
|
||||||
|
size *= scale;
|
||||||
|
|
||||||
|
this->ui->graphicsView_Tiles->setResizeAnchor(QGraphicsView::NoAnchor);
|
||||||
|
this->ui->graphicsView_Tiles->setTransform(transform);
|
||||||
|
this->ui->graphicsView_Tiles->setFixedSize(size.width() + 2, size.height() + 2);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue