summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-22 10:15:17 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-23 11:05:33 +0200
commit81310e18abba8d17289cde6670e62d96f24e9d01 (patch)
treecee6e1713f84b12a89669eaa1781248e16c3131e /gui
parent46f89ce2321909198774a1c1e8b481436540c11a (diff)
gui/options, logic: add experimental offset from center
This works fine for rotating the translation.
Diffstat (limited to 'gui')
-rw-r--r--gui/options-dialog.cpp1
-rw-r--r--gui/settings.ui195
2 files changed, 149 insertions, 47 deletions
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index fb0b3454..3b54ae9a 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -68,6 +68,7 @@ OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
tie_setting(main.camera_yaw, ui.camera_yaw);
tie_setting(main.camera_pitch, ui.camera_pitch);
tie_setting(main.camera_roll, ui.camera_roll);
+ tie_setting(main.use_camera_offset_from_centering, ui.use_center_as_translation_camera_offset);
tie_setting(main.center_method, ui.center_method);
diff --git a/gui/settings.ui b/gui/settings.ui
index 4c166a08..45541d45 100644
--- a/gui/settings.ui
+++ b/gui/settings.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>384</width>
- <height>639</height>
+ <width>480</width>
+ <height>625</height>
</rect>
</property>
<property name="windowTitle">
@@ -24,12 +24,24 @@
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
- <item>
+ <item alignment="Qt::AlignTop">
<widget class="QTabWidget" name="tabWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<attribute name="title">
<string>Shortcuts</string>
</attribute>
@@ -279,46 +291,6 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_9">
- <property name="title">
- <string>Centering method</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="1" column="0">
- <widget class="QLabel" name="label_26">
- <property name="text">
- <string>Method</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="center_method">
- <item>
- <property name="text">
- <string>Relative (inertial device)</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Absolute (camera device)</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label_25">
- <property name="text">
- <string>Try changing this if centering doesn't perform correctly for your input device.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<widget class="QCheckBox" name="center_at_startup">
<property name="text">
<string>Center at startup</string>
@@ -332,13 +304,29 @@
</property>
</widget>
</item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Camera</string>
</attribute>
- <layout class="QVBoxLayout" name="verticalLayout_3">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
@@ -364,6 +352,26 @@
</property>
</widget>
</item>
+ <item row="5" column="0">
+ <widget class="QCheckBox" name="use_center_as_translation_camera_offset">
+ <property name="text">
+ <string>Use camera center as translation offset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_29">
+ <property name="text">
+ <string>This option is experimental. Please report your findings on the github issue tracker.</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
<item row="3" column="0" alignment="Qt::AlignLeft">
<widget class="QGroupBox" name="groupBox_3">
<property name="styleSheet">
@@ -373,6 +381,12 @@
}</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
+ <property name="topMargin">
+ <number>2</number>
+ </property>
+ <property name="bottomMargin">
+ <number>2</number>
+ </property>
<item row="2" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
@@ -445,6 +459,19 @@
</layout>
</widget>
</item>
+ <item row="4" column="0">
+ <widget class="Line" name="line">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="lineWidth">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -632,14 +659,69 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="groupBox_9">
+ <property name="title">
+ <string>Centering method</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_26">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>2</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Method</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="center_method">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>3</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <item>
+ <property name="text">
+ <string>Relative (inertial device)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Absolute (camera device)</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_25">
+ <property name="text">
+ <string>Try changing this if centering doesn't perform correctly for your input device.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>40</height>
+ <height>0</height>
</size>
</property>
</spacer>
@@ -1133,10 +1215,13 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>40</height>
+ <height>0</height>
</size>
</property>
</spacer>
@@ -1154,7 +1239,7 @@
<string>Game detection</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
- <item row="1" column="0">
+ <item row="1" column="0" alignment="Qt::AlignTop">
<widget class="process_detector" name="game_detector" native="true"/>
</item>
<item row="0" column="0">
@@ -1176,6 +1261,22 @@
</layout>
</widget>
</item>
+ <item>
+ <spacer name="verticalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
</widget>