summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--facetracknoir/keyboard.ui145
-rw-r--r--facetracknoir/shortcut-dialog.cpp2
-rw-r--r--opentrack/main-settings.hpp4
-rw-r--r--opentrack/tracker.cpp2
4 files changed, 82 insertions, 71 deletions
diff --git a/facetracknoir/keyboard.ui b/facetracknoir/keyboard.ui
index 903bb20f..cdfc0657 100644
--- a/facetracknoir/keyboard.ui
+++ b/facetracknoir/keyboard.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>461</width>
- <height>174</height>
+ <height>181</height>
</rect>
</property>
<property name="sizePolicy">
@@ -39,6 +39,45 @@
<enum>QFrame::Plain</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
+ <item row="2" column="1">
+ <widget class="QCheckBox" name="chkToggleShift">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QCheckBox" name="chkToggleCtrl">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Ctrl</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QCheckBox" name="chkZeroShift">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ </item>
<item row="3" column="0">
<widget class="QLabel" name="textLabel2_6">
<property name="sizePolicy">
@@ -100,24 +139,8 @@
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="textLabel2_3">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Center</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkCenterShift">
+ <item row="2" column="3">
+ <widget class="QCheckBox" name="chkToggleAlt">
<property name="maximumSize">
<size>
<width>50</width>
@@ -125,7 +148,7 @@
</size>
</property>
<property name="text">
- <string>Shift</string>
+ <string>Alt</string>
</property>
</widget>
</item>
@@ -142,8 +165,8 @@
</property>
</widget>
</item>
- <item row="2" column="3">
- <widget class="QCheckBox" name="chkToggleAlt">
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="chkCenterShift">
<property name="maximumSize">
<size>
<width>50</width>
@@ -151,36 +174,23 @@
</size>
</property>
<property name="text">
- <string>Alt</string>
- </property>
- </widget>
- </item>
- <item row="2" column="5">
- <widget class="QComboBox" name="cbxToggleKey">
- <property name="minimumSize">
- <size>
- <width>90</width>
- <height>0</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Select Number</string>
- </property>
- <property name="insertPolicy">
- <enum>QComboBox::InsertAlphabetically</enum>
+ <string>Shift</string>
</property>
</widget>
</item>
- <item row="1" column="3">
- <widget class="QCheckBox" name="chkCenterAlt">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
+ <item row="1" column="0">
+ <widget class="QLabel" name="textLabel2_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
<property name="text">
- <string>Alt</string>
+ <string>Center</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
</property>
</widget>
</item>
@@ -216,34 +226,24 @@
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkToggleShift">
- <property name="maximumSize">
+ <item row="2" column="5">
+ <widget class="QComboBox" name="cbxToggleKey">
+ <property name="minimumSize">
<size>
- <width>50</width>
- <height>16777215</height>
+ <width>90</width>
+ <height>0</height>
</size>
</property>
- <property name="text">
- <string>Shift</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QCheckBox" name="chkToggleCtrl">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
+ <property name="toolTip">
+ <string>Select Number</string>
</property>
- <property name="text">
- <string>Ctrl</string>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAlphabetically</enum>
</property>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QCheckBox" name="chkZeroShift">
+ <item row="1" column="3">
+ <widget class="QCheckBox" name="chkCenterAlt">
<property name="maximumSize">
<size>
<width>50</width>
@@ -251,7 +251,7 @@
</size>
</property>
<property name="text">
- <string>Shift</string>
+ <string>Alt</string>
</property>
</widget>
</item>
@@ -275,6 +275,13 @@
</widget>
</item>
<item>
+ <widget class="QCheckBox" name="center_at_startup">
+ <property name="text">
+ <string>Center at startup</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QCheckBox" name="trayp">
<property name="text">
<string>Minimize to tray</string>
diff --git a/facetracknoir/shortcut-dialog.cpp b/facetracknoir/shortcut-dialog.cpp
index f2934c15..437365b4 100644
--- a/facetracknoir/shortcut-dialog.cpp
+++ b/facetracknoir/shortcut-dialog.cpp
@@ -29,6 +29,8 @@ KeyboardShortcutDialog::KeyboardShortcutDialog()
tie_setting(s.zero.ctrl, ui.chkZeroCtrl);
tie_setting(s.s_main.tray_enabled, ui.trayp);
+
+ tie_setting(s.s_main.center_at_startup, ui.center_at_startup);
}
void KeyboardShortcutDialog::doOK() {
diff --git a/opentrack/main-settings.hpp b/opentrack/main-settings.hpp
index def21f31..971e0fba 100644
--- a/opentrack/main-settings.hpp
+++ b/opentrack/main-settings.hpp
@@ -29,6 +29,7 @@ struct main_settings {
value<bool> tcomp_p, tcomp_tz;
value<bool> tray_enabled;
value<int> camera_yaw, camera_pitch;
+ value<bool> center_at_startup;
main_settings(pbundle b) :
b(b),
tracker_dll(b, "tracker-dll", ""),
@@ -45,6 +46,7 @@ struct main_settings {
tcomp_tz(b, "compensate-translation-disable-z-axis", false),
tray_enabled(b, "use-system-tray", false),
camera_yaw(b, "camera-yaw", 0),
- camera_pitch(b, "camera-pitch", 0)
+ camera_pitch(b, "camera-pitch", 0),
+ center_at_startup(b, "center-at-startup", true)
{}
};
diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp
index 338c9113..6ce9a75f 100644
--- a/opentrack/tracker.cpp
+++ b/opentrack/tracker.cpp
@@ -24,7 +24,7 @@
Tracker::Tracker(main_settings& s, Mappings &m, SelectedLibraries &libs) :
s(s),
m(m),
- centerp(true),
+ centerp(s.center_at_startup),
enabledp(true),
zero_(false),
should_quit(false),