summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-02 15:29:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-10-02 15:29:03 +0200
commit851116d818ddd01d5935c1bba10fe4900771d980 (patch)
treeecdf4ba5e63cc0ee854e11223f80b87cfa2c14a0 /facetracknoir
parent4117f4c65ef98a0dab2381e6ef6a969fb1be5f14 (diff)
main: add relative and absolute center options
Closes #237
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/options-dialog.cpp2
-rw-r--r--facetracknoir/settings.ui40
2 files changed, 42 insertions, 0 deletions
diff --git a/facetracknoir/options-dialog.cpp b/facetracknoir/options-dialog.cpp
index 1ec26d5e..fef2b0ca 100644
--- a/facetracknoir/options-dialog.cpp
+++ b/facetracknoir/options-dialog.cpp
@@ -50,6 +50,8 @@ OptionsDialog::OptionsDialog()
tie_setting(s.s_main.camera_pitch, ui.camera_pitch);
tie_setting(s.s_main.camera_roll, ui.camera_roll);
+ tie_setting(s.s_main.center_method, ui.center_method);
+
connect(ui.bind_center, &QPushButton::pressed, [&]() -> void { bind_key(s.center.keycode, ui.center_text); });
connect(ui.bind_zero, &QPushButton::pressed, [&]() -> void { bind_key(s.zero.keycode, ui.zero_text); });
connect(ui.bind_toggle, &QPushButton::pressed, [&]() -> void { bind_key(s.toggle.keycode, ui.toggle_text); });
diff --git a/facetracknoir/settings.ui b/facetracknoir/settings.ui
index 5eea9e57..d87b68bf 100644
--- a/facetracknoir/settings.ui
+++ b/facetracknoir/settings.ui
@@ -141,6 +141,46 @@
</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</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Absolute</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>