Even more global game settings implemented, added transparent background settings dialog
This commit is contained in:
@@ -27,6 +27,7 @@ INCLUDEPATH += \
|
|||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/closeeventfilter.h \
|
src/closeeventfilter.h \
|
||||||
src/editor/dialogs/genericcodeeditordialog.h \
|
src/editor/dialogs/genericcodeeditordialog.h \
|
||||||
|
src/editor/dialogs/transparentbackgroundsettingsdialog.h \
|
||||||
src/editor/editorguiutils.h \
|
src/editor/editorguiutils.h \
|
||||||
src/editor/roomscene.h \
|
src/editor/roomscene.h \
|
||||||
src/editor/widgets/actiondragwidget.h \
|
src/editor/widgets/actiondragwidget.h \
|
||||||
@@ -88,6 +89,7 @@ HEADERS += \
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
src/closeeventfilter.cpp \
|
src/closeeventfilter.cpp \
|
||||||
src/editor/dialogs/genericcodeeditordialog.cpp \
|
src/editor/dialogs/genericcodeeditordialog.cpp \
|
||||||
|
src/editor/dialogs/transparentbackgroundsettingsdialog.cpp \
|
||||||
src/editor/editorguiutils.cpp \
|
src/editor/editorguiutils.cpp \
|
||||||
src/editor/roomscene.cpp \
|
src/editor/roomscene.cpp \
|
||||||
src/editor/widgets/actiondragwidget.cpp \
|
src/editor/widgets/actiondragwidget.cpp \
|
||||||
@@ -146,6 +148,7 @@ SOURCES += \
|
|||||||
src/projectserialization.cpp
|
src/projectserialization.cpp
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
|
src/editor/dialogs/transparentbackgroundsettingsdialog.ui \
|
||||||
src/editor/mainwindow.ui \
|
src/editor/mainwindow.ui \
|
||||||
src/editor/dialogs/addeventdialog.ui \
|
src/editor/dialogs/addeventdialog.ui \
|
||||||
src/editor/dialogs/backgroundpropertiesdialog.ui \
|
src/editor/dialogs/backgroundpropertiesdialog.ui \
|
||||||
|
@@ -330,7 +330,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="radioButtonResolution1600x1200">
|
<widget class="QRadioButton" name="radioButtonResolution1600x1200">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>RadioButton</string>
|
<string>1600x1200</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>634</width>
|
||||||
<height>300</height>
|
<height>614</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -16,24 +16,439 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,0">
|
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,0">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<widget class="QWidget" name="tabGeneral">
|
<widget class="QWidget" name="tabGeneral">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>General</string>
|
<string>&General</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,1">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0,0,0,0,0,0,0,0,0,0,0,1">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</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>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0,1">
|
||||||
|
<item>
|
||||||
|
<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>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<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>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<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>
|
||||||
|
<widget class="QCheckBox" name="checkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<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>
|
||||||
|
<widget class="QCheckBox" name="checkBox_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<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>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::HLine</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,0,0,0,0,0,0,1">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<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>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBox"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_6">
|
||||||
|
<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>
|
||||||
|
<widget class="QCheckBox" name="checkBox_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_7">
|
||||||
|
<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>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabForms">
|
<widget class="QWidget" name="tabForms">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Forms</string>
|
<string>&Forms</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,0,0,1">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>GroupBox</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_12">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_10">
|
||||||
|
<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>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>GroupBox</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="0,0,0,1">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<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>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox_2"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_9">
|
||||||
|
<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>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>GroupBox</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_14">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_15">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_16">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_17">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="toolButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_8">
|
||||||
|
<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>
|
</widget>
|
||||||
<widget class="QWidget" name="tabScriptsAndCode">
|
<widget class="QWidget" name="tabScriptsAndCode">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Scripts and Code</string>
|
<string>&Scripts and Code</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabEditors">
|
<widget class="QWidget" name="tabEditors">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Editors</string>
|
<string>&Editors</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
@@ -101,7 +101,7 @@
|
|||||||
<enum>QTabWidget::West</enum>
|
<enum>QTabWidget::West</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabObjects">
|
<widget class="QWidget" name="tabObjects">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -133,8 +133,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>419</width>
|
<width>402</width>
|
||||||
<height>333</height>
|
<height>297</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButtonCreationCode">
|
<widget class="QPushButton" name="pushButtonCreationCode">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>CreationCode</string>
|
<string>C&reationCode</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../resources_editor.qrc">
|
<iconset resource="../resources_editor.qrc">
|
||||||
@@ -402,8 +402,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>459</width>
|
<width>473</width>
|
||||||
<height>482</height>
|
<height>478</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
11
src/editor/dialogs/transparentbackgroundsettingsdialog.cpp
Normal file
11
src/editor/dialogs/transparentbackgroundsettingsdialog.cpp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#include "transparentbackgroundsettingsdialog.h"
|
||||||
|
#include "ui_transparentbackgroundsettingsdialog.h"
|
||||||
|
|
||||||
|
TransparentBackgroundSettingsDialog::TransparentBackgroundSettingsDialog(QWidget *parent) :
|
||||||
|
QDialog{parent},
|
||||||
|
m_ui{std::make_unique<Ui::TransparentBackgroundSettingsDialog>()}
|
||||||
|
{
|
||||||
|
m_ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
TransparentBackgroundSettingsDialog::~TransparentBackgroundSettingsDialog() = default;
|
19
src/editor/dialogs/transparentbackgroundsettingsdialog.h
Normal file
19
src/editor/dialogs/transparentbackgroundsettingsdialog.h
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
namespace Ui { class TransparentBackgroundSettingsDialog; }
|
||||||
|
|
||||||
|
class TransparentBackgroundSettingsDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit TransparentBackgroundSettingsDialog(QWidget *parent = nullptr);
|
||||||
|
~TransparentBackgroundSettingsDialog() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
const std::unique_ptr<Ui::TransparentBackgroundSettingsDialog> m_ui;
|
||||||
|
};
|
68
src/editor/dialogs/transparentbackgroundsettingsdialog.ui
Normal file
68
src/editor/dialogs/transparentbackgroundsettingsdialog.ui
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>TransparentBackgroundSettingsDialog</class>
|
||||||
|
<widget class="QDialog" name="TransparentBackgroundSettingsDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Transparent Background Settings</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>240</y>
|
||||||
|
<width>341</width>
|
||||||
|
<height>32</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>TransparentBackgroundSettingsDialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>TransparentBackgroundSettingsDialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
@@ -24,6 +24,7 @@
|
|||||||
#include "dialogs/objectpropertiesdialog.h"
|
#include "dialogs/objectpropertiesdialog.h"
|
||||||
#include "dialogs/roompropertiesdialog.h"
|
#include "dialogs/roompropertiesdialog.h"
|
||||||
#include "dialogs/objectinformationdialog.h"
|
#include "dialogs/objectinformationdialog.h"
|
||||||
|
#include "dialogs/transparentbackgroundsettingsdialog.h"
|
||||||
#include "dialogs/gameinformationdialog.h"
|
#include "dialogs/gameinformationdialog.h"
|
||||||
#include "dialogs/globalgamesettingsdialog.h"
|
#include "dialogs/globalgamesettingsdialog.h"
|
||||||
#include "dialogs/extensionpackagesdialog.h"
|
#include "dialogs/extensionpackagesdialog.h"
|
||||||
@@ -103,6 +104,7 @@ MainWindow::MainWindow(const QString &filePath, QWidget *parent) :
|
|||||||
connect(m_ui->actionProperties, &QAction::triggered, this, &MainWindow::showProperties);
|
connect(m_ui->actionProperties, &QAction::triggered, this, &MainWindow::showProperties);
|
||||||
connect(m_ui->actionFindResource, &QAction::triggered, this, &MainWindow::findResource);
|
connect(m_ui->actionFindResource, &QAction::triggered, this, &MainWindow::findResource);
|
||||||
connect(m_ui->actionShowObjectInformation, &QAction::triggered, this, &MainWindow::showObjectInformation);
|
connect(m_ui->actionShowObjectInformation, &QAction::triggered, this, &MainWindow::showObjectInformation);
|
||||||
|
connect(m_ui->actionTransparentBackgroundSettings, &QAction::triggered, this, &MainWindow::transparentBackgroundSettings);
|
||||||
connect(m_ui->actionCreateSprite, &QAction::triggered, this, &MainWindow::createFor<Sprite>);
|
connect(m_ui->actionCreateSprite, &QAction::triggered, this, &MainWindow::createFor<Sprite>);
|
||||||
connect(m_ui->actionCreateSound, &QAction::triggered, this, &MainWindow::createFor<Sound>);
|
connect(m_ui->actionCreateSound, &QAction::triggered, this, &MainWindow::createFor<Sound>);
|
||||||
connect(m_ui->actionCreateBackground, &QAction::triggered, this, &MainWindow::createFor<Background>);
|
connect(m_ui->actionCreateBackground, &QAction::triggered, this, &MainWindow::createFor<Background>);
|
||||||
@@ -714,6 +716,12 @@ void MainWindow::showObjectInformation()
|
|||||||
openOrActivateWindow<ObjectInformationDialog>(m_objectInformationWindow, m_project);
|
openOrActivateWindow<ObjectInformationDialog>(m_objectInformationWindow, m_project);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::transparentBackgroundSettings()
|
||||||
|
{
|
||||||
|
TransparentBackgroundSettingsDialog dialog{this};
|
||||||
|
dialog.exec();
|
||||||
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void MainWindow::createFor()
|
void MainWindow::createFor()
|
||||||
{
|
{
|
||||||
|
@@ -56,6 +56,7 @@ private slots:
|
|||||||
void showProperties();
|
void showProperties();
|
||||||
void findResource();
|
void findResource();
|
||||||
void showObjectInformation();
|
void showObjectInformation();
|
||||||
|
void transparentBackgroundSettings();
|
||||||
private:
|
private:
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void createFor();
|
void createFor();
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1366</width>
|
<width>1366</width>
|
||||||
<height>20</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
@@ -112,6 +112,7 @@
|
|||||||
<addaction name="actionCollapseResourceTree"/>
|
<addaction name="actionCollapseResourceTree"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionShowObjectInformation"/>
|
<addaction name="actionShowObjectInformation"/>
|
||||||
|
<addaction name="actionTransparentBackgroundSettings"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuResources">
|
<widget class="QMenu" name="menuResources">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -831,6 +832,11 @@
|
|||||||
<string>Ta&bbed view</string>
|
<string>Ta&bbed view</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionTransparentBackgroundSettings">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Transparent Background Settings</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
struct GlobalGameSettings
|
struct GlobalGameSettings
|
||||||
{
|
{
|
||||||
|
// Graphics settings
|
||||||
bool startInFullscreenMode{};
|
bool startInFullscreenMode{};
|
||||||
struct FixedScale {
|
struct FixedScale {
|
||||||
int percent{100};
|
int percent{100};
|
||||||
@@ -32,11 +33,57 @@ struct GlobalGameSettings
|
|||||||
bool displayCursor{true};
|
bool displayCursor{true};
|
||||||
bool freezeWhenFocusLost{};
|
bool freezeWhenFocusLost{};
|
||||||
bool disableScreensaver{true};
|
bool disableScreensaver{true};
|
||||||
struct Resolution {
|
|
||||||
|
|
||||||
|
// Resolution settings
|
||||||
|
struct ScreenSetting {
|
||||||
|
enum class ColorDepth {
|
||||||
|
NoChange,
|
||||||
|
_16bit,
|
||||||
|
_32bit
|
||||||
|
};
|
||||||
|
ColorDepth colorDepth;
|
||||||
|
enum class Resolution {
|
||||||
|
NoChange,
|
||||||
|
_320x240,
|
||||||
|
_640x480,
|
||||||
|
_800x600,
|
||||||
|
_1024x768,
|
||||||
|
_1280x1024,
|
||||||
|
_1600x1200
|
||||||
|
};
|
||||||
|
Resolution resolution;
|
||||||
|
enum class Frequency {
|
||||||
|
NoChange,
|
||||||
|
_60,
|
||||||
|
_70,
|
||||||
|
_85,
|
||||||
|
_100,
|
||||||
|
_120
|
||||||
|
};
|
||||||
|
Frequency frequency;
|
||||||
};
|
};
|
||||||
std::optional<Resolution> resolution;
|
std::optional<ScreenSetting> screenSetting;
|
||||||
bool vsync{};
|
bool vsync{};
|
||||||
|
|
||||||
|
// Other settings
|
||||||
|
bool letEscEndGame{true};
|
||||||
|
bool treatCloseButtonAsEsc{true};
|
||||||
|
bool letF1ShowGameInformation{true};
|
||||||
|
bool letF4SwitchBetweenScreenModes{true};
|
||||||
|
bool letF5SaveF6LoadGame{true};
|
||||||
|
bool letF9TakeScreenshot{true};
|
||||||
|
enum class Priority {
|
||||||
|
Normal, High, Highest
|
||||||
|
};
|
||||||
|
Priority priority;
|
||||||
|
int major{1};
|
||||||
|
int minor{};
|
||||||
|
int release{};
|
||||||
|
int build{};
|
||||||
|
QString company;
|
||||||
|
QString product;
|
||||||
|
QString copyright;
|
||||||
|
QString description;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Sprite
|
struct Sprite
|
||||||
|
@@ -15,8 +15,23 @@ QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings &globalGameSet
|
|||||||
<< globalGameSettings.displayCursor
|
<< globalGameSettings.displayCursor
|
||||||
<< globalGameSettings.freezeWhenFocusLost
|
<< globalGameSettings.freezeWhenFocusLost
|
||||||
<< globalGameSettings.disableScreensaver
|
<< globalGameSettings.disableScreensaver
|
||||||
<< globalGameSettings.resolution
|
<< globalGameSettings.screenSetting
|
||||||
<< globalGameSettings.vsync;
|
<< globalGameSettings.vsync
|
||||||
|
<< globalGameSettings.letEscEndGame
|
||||||
|
<< globalGameSettings.treatCloseButtonAsEsc
|
||||||
|
<< globalGameSettings.letF1ShowGameInformation
|
||||||
|
<< globalGameSettings.letF4SwitchBetweenScreenModes
|
||||||
|
<< globalGameSettings.letF5SaveF6LoadGame
|
||||||
|
<< globalGameSettings.letF9TakeScreenshot
|
||||||
|
<< globalGameSettings.priority
|
||||||
|
<< globalGameSettings.major
|
||||||
|
<< globalGameSettings.minor
|
||||||
|
<< globalGameSettings.release
|
||||||
|
<< globalGameSettings.build
|
||||||
|
<< globalGameSettings.company
|
||||||
|
<< globalGameSettings.product
|
||||||
|
<< globalGameSettings.copyright
|
||||||
|
<< globalGameSettings.description;
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,8 +48,23 @@ QDataStream &operator>>(QDataStream &ds, GlobalGameSettings &globalGameSettings)
|
|||||||
>> globalGameSettings.displayCursor
|
>> globalGameSettings.displayCursor
|
||||||
>> globalGameSettings.freezeWhenFocusLost
|
>> globalGameSettings.freezeWhenFocusLost
|
||||||
>> globalGameSettings.disableScreensaver
|
>> globalGameSettings.disableScreensaver
|
||||||
>> globalGameSettings.resolution
|
>> globalGameSettings.screenSetting
|
||||||
>> globalGameSettings.vsync;
|
>> globalGameSettings.vsync
|
||||||
|
>> globalGameSettings.letEscEndGame
|
||||||
|
>> globalGameSettings.treatCloseButtonAsEsc
|
||||||
|
>> globalGameSettings.letF1ShowGameInformation
|
||||||
|
>> globalGameSettings.letF4SwitchBetweenScreenModes
|
||||||
|
>> globalGameSettings.letF5SaveF6LoadGame
|
||||||
|
>> globalGameSettings.letF9TakeScreenshot
|
||||||
|
>> globalGameSettings.priority
|
||||||
|
>> globalGameSettings.major
|
||||||
|
>> globalGameSettings.minor
|
||||||
|
>> globalGameSettings.release
|
||||||
|
>> globalGameSettings.build
|
||||||
|
>> globalGameSettings.company
|
||||||
|
>> globalGameSettings.product
|
||||||
|
>> globalGameSettings.copyright
|
||||||
|
>> globalGameSettings.description;
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,17 +108,19 @@ QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::FullScale &fullScal
|
|||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::Resolution &resolution)
|
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::ScreenSetting &screenSetting)
|
||||||
{
|
{
|
||||||
Q_UNUSED(resolution);
|
ds << screenSetting.colorDepth
|
||||||
//ds << resolution.;
|
<< screenSetting.resolution
|
||||||
|
<< screenSetting.frequency;
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::Resolution &resolution)
|
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::ScreenSetting &screenSetting)
|
||||||
{
|
{
|
||||||
Q_UNUSED(resolution);
|
ds >> screenSetting.colorDepth
|
||||||
//ds >> resolution.;
|
>> screenSetting.resolution
|
||||||
|
>> screenSetting.frequency;
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,8 +12,8 @@ QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::KeepAspectRat
|
|||||||
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::KeepAspectRatio &keepAspectRatio);
|
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::KeepAspectRatio &keepAspectRatio);
|
||||||
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::FullScale &fullScale);
|
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::FullScale &fullScale);
|
||||||
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::FullScale &fullScale);
|
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::FullScale &fullScale);
|
||||||
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::Resolution &resolution);
|
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::ScreenSetting &screenSetting);
|
||||||
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::Resolution &resolution);
|
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::ScreenSetting &screenSetting);
|
||||||
QDataStream &operator<<(QDataStream &ds, const Sprite &sprite);
|
QDataStream &operator<<(QDataStream &ds, const Sprite &sprite);
|
||||||
QDataStream &operator>>(QDataStream &ds, Sprite &sprite);
|
QDataStream &operator>>(QDataStream &ds, Sprite &sprite);
|
||||||
QDataStream &operator<<(QDataStream &ds, const Sound &sound);
|
QDataStream &operator<<(QDataStream &ds, const Sound &sound);
|
||||||
|
Reference in New Issue
Block a user