Skip to content

Commit

Permalink
Add prompts to project settings editor
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Aug 29, 2023
1 parent 9bed66e commit 871a6ed
Show file tree
Hide file tree
Showing 6 changed files with 299 additions and 188 deletions.
207 changes: 131 additions & 76 deletions forms/projectsettingseditor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<x>0</x>
<y>0</y>
<width>544</width>
<height>994</height>
<height>1096</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
Expand Down Expand Up @@ -64,6 +64,28 @@
<property name="title">
<string>Default Tilesets</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_PrimaryTileset">
<property name="text">
<string>Primary Tileset</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="NoScrollComboBox" name="comboBox_DefaultPrimaryTileset"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_SecondaryTileset">
<property name="text">
<string>Secondary Tileset</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="NoScrollComboBox" name="comboBox_DefaultSecondaryTileset"/>
</item>
</layout>
</widget>
</item>
<item>
Expand Down Expand Up @@ -163,23 +185,34 @@
<string>Prefabs</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_PrefabsPath"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="checkBox_PrefabImportPrompted">
<property name="text">
<string>Prefab import prompted</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_PrefabsPath">
<property name="text">
<string>Prefabs Path</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="checkBox_PrefabImportPrompted">
<item row="0" column="2">
<widget class="QToolButton" name="button_ChoosePrefabs">
<property name="text">
<string>Prefab import prompted</string>
<string>...</string>
</property>
<property name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/folder.ico</normaloff>:/icons/folder.ico</iconset>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_PrefabsPath"/>
</item>
</layout>
</widget>
</item>
Expand Down Expand Up @@ -208,11 +241,20 @@
</widget>
</item>
<item>
<widget class="QWidget" name="widget_BaseGameVersionBox" native="true">
<widget class="QWidget" name="widget_BaseGameVersion" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QWidget" name="widget_BaseGameVersion" native="true">
<layout class="QFormLayout" name="layout_BaseGameVersion"/>
<widget class="QLabel" name="label_BaseGameVersion">
<property name="text">
<string>Base game version</string>
</property>
</widget>
</item>
<item>
<widget class="NoScrollComboBox" name="comboBox_BaseGameVersion">
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
<item>
Expand All @@ -237,84 +279,88 @@
<string>Tilesets / Metatiles</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<widget class="QLabel" name="label_AttributesSize">
<property name="toolTip">
<string>The number of bytes used per metatile for metatile attributes</string>
</property>
<property name="text">
<string>Attributes size (in bytes)</string>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<item row="8" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>15</height>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_TerrainTypeMask">
<property name="toolTip">
<string>The mask used to read/write Terrain Type from the metatile's attributes data. If 0, this attribute is disabled.</string>
</property>
<property name="text">
<string>Terrain Type mask</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBox_EnableTripleLayerMetatiles">
<property name="text">
<string>Enable Triple Layer Metatiles</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QWidget" name="widget_SizeDropdown" native="true"/>
<item row="7" column="1">
<widget class="QSpinBox" name="spinBox_TerrainTypeMask">
<property name="prefix">
<string>0x</string>
</property>
<property name="displayIntegerBase">
<number>16</number>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="checkBox_OutputIsCompressed">
<item row="2" column="0">
<widget class="QLabel" name="label_AttributesSize">
<property name="toolTip">
<string>Whether the C data outputted for new tilesets will include the &quot;isCompressed&quot; field</string>
<string>The number of bytes used per metatile for metatile attributes</string>
</property>
<property name="text">
<string>Output 'isCompressed' field</string>
<string>Attributes size (in bytes)</string>
</property>
</widget>
</item>
<item row="7" column="0">
<spacer name="verticalSpacer_2">
<widget class="QLabel" name="label_TerrainTypeMask">
<property name="toolTip">
<string>The mask used to read/write Terrain Type from the metatile's attributes data. If 0, this attribute is disabled.</string>
</property>
<property name="text">
<string>Terrain Type mask</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="NoScrollComboBox" name="comboBox_AttributesSize">
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
<height>15</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="spinBox_EncounterTypeMask">
<property name="prefix">
<string>0x</string>
<item row="3" column="0">
<widget class="QLabel" name="label_BehaviorMask">
<property name="toolTip">
<string>The mask used to read/write Metatile Behavior from the metatile's attributes data. If 0, this attribute is disabled.</string>
</property>
<property name="displayIntegerBase">
<number>16</number>
<property name="text">
<string>Behavior mask</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="spinBox_LayerTypeMask">
<item row="3" column="1">
<widget class="QSpinBox" name="spinBox_BehaviorMask">
<property name="prefix">
<string>0x</string>
</property>
Expand All @@ -323,58 +369,58 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_EncounterTypeMask">
<item row="10" column="0">
<widget class="QCheckBox" name="checkBox_OutputCallback">
<property name="toolTip">
<string>The mask used to read/write Encounter Type from the metatile's attributes data. If 0, this attribute is disabled.</string>
<string>Whether the C data outputted for new tilesets will include the &quot;callback&quot; field</string>
</property>
<property name="text">
<string>Encounter Type mask</string>
<string>Output 'callback' field</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QCheckBox" name="checkBox_OutputCallback">
<item row="11" column="0">
<widget class="QCheckBox" name="checkBox_OutputIsCompressed">
<property name="toolTip">
<string>Whether the C data outputted for new tilesets will include the &quot;callback&quot; field</string>
<string>Whether the C data outputted for new tilesets will include the &quot;isCompressed&quot; field</string>
</property>
<property name="text">
<string>Output 'callback' field</string>
<string>Output 'isCompressed' field</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_BehaviorMask">
<property name="toolTip">
<string>The mask used to read/write Metatile Behavior from the metatile's attributes data. If 0, this attribute is disabled.</string>
<item row="5" column="1">
<widget class="QSpinBox" name="spinBox_EncounterTypeMask">
<property name="prefix">
<string>0x</string>
</property>
<property name="text">
<string>Behavior mask</string>
<property name="displayIntegerBase">
<number>16</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_LayerTypeMask">
<widget class="QLabel" name="label_EncounterTypeMask">
<property name="toolTip">
<string>The mask used to read/write Layer Type from the metatile's attributes data. If 0, this attribute is disabled.</string>
<string>The mask used to read/write Encounter Type from the metatile's attributes data. If 0, this attribute is disabled.</string>
</property>
<property name="text">
<string>Layer Type mask</string>
<string>Encounter Type mask</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="spinBox_BehaviorMask">
<property name="prefix">
<string>0x</string>
<item row="4" column="0">
<widget class="QLabel" name="label_LayerTypeMask">
<property name="toolTip">
<string>The mask used to read/write Layer Type from the metatile's attributes data. If 0, this attribute is disabled.</string>
</property>
<property name="displayIntegerBase">
<number>16</number>
<property name="text">
<string>Layer Type mask</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinBox_TerrainTypeMask">
<item row="4" column="1">
<widget class="QSpinBox" name="spinBox_LayerTypeMask">
<property name="prefix">
<string>0x</string>
</property>
Expand Down Expand Up @@ -509,13 +555,22 @@
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<customwidgets>
<customwidget>
<class>NoScrollComboBox</class>
<extends>QComboBox</extends>
<header>noscrollcombobox.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../resources/images.qrc"/>
</resources>
<connections/>
</ui>
4 changes: 4 additions & 0 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class PorymapConfig: public KeyValueConfigBase
void setTilesetEditorGeometry(QByteArray, QByteArray);
void setPaletteEditorGeometry(QByteArray, QByteArray);
void setRegionMapEditorGeometry(QByteArray, QByteArray);
void setProjectSettingsEditorGeometry(QByteArray, QByteArray);
void setCollisionOpacity(int opacity);
void setMetatilesZoom(int zoom);
void setShowPlayerView(bool enabled);
Expand All @@ -93,6 +94,7 @@ class PorymapConfig: public KeyValueConfigBase
QMap<QString, QByteArray> getTilesetEditorGeometry();
QMap<QString, QByteArray> getPaletteEditorGeometry();
QMap<QString, QByteArray> getRegionMapEditorGeometry();
QMap<QString, QByteArray> getProjectSettingsEditorGeometry();
int getCollisionOpacity();
int getMetatilesZoom();
bool getShowPlayerView();
Expand Down Expand Up @@ -129,6 +131,8 @@ class PorymapConfig: public KeyValueConfigBase
QByteArray paletteEditorState;
QByteArray regionMapEditorGeometry;
QByteArray regionMapEditorState;
QByteArray projectSettingsEditorGeometry;
QByteArray projectSettingsEditorState;
int collisionOpacity;
int metatilesZoom;
bool showPlayerView;
Expand Down
Loading

0 comments on commit 871a6ed

Please sign in to comment.