summaryrefslogtreecommitdiffhomepage
path: root/opentrack/main-settings.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack/main-settings.hpp')
-rw-r--r--opentrack/main-settings.hpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/opentrack/main-settings.hpp b/opentrack/main-settings.hpp
index b7b086ad..793c52f7 100644
--- a/opentrack/main-settings.hpp
+++ b/opentrack/main-settings.hpp
@@ -32,7 +32,18 @@ private:
}
};
-struct main_settings : opts {
+struct key_opts {
+ value<QString> keycode, guid;
+ value<int> button;
+
+ key_opts(pbundle b, const QString& name) :
+ keycode(b, QString("keycode-%1").arg(name), ""),
+ guid(b, QString("guid-%1").arg(name), ""),
+ button(b, QString("button-%1").arg(name), -1)
+ {}
+};
+
+struct main_settings : opts {
value<QString> tracker_dll, filter_dll, protocol_dll;
axis_opts a_x, a_y, a_z, a_yaw, a_pitch, a_roll;
value<bool> tcomp_p, tcomp_tz;
@@ -40,6 +51,8 @@ struct main_settings : opts {
value<int> camera_yaw, camera_pitch, camera_roll;
value<bool> center_at_startup;
value<int> center_method;
+ key_opts key_start_tracking, key_stop_tracking, key_toggle_tracking;
+ key_opts key_center, key_toggle, key_zero;
main_settings() :
opts("opentrack-ui"),
tracker_dll(b, "tracker-dll", ""),
@@ -58,6 +71,13 @@ struct main_settings : opts {
camera_pitch(b, "camera-pitch", 0),
camera_roll(b, "camera-roll", 0),
center_at_startup(b, "center-at-startup", true),
- center_method(b, "centering-method", true)
- {}
+ center_method(b, "centering-method", true),
+ key_start_tracking(b, "start-tracking"),
+ key_stop_tracking(b, "stop-tracking"),
+ key_toggle_tracking(b, "toggle-tracking"),
+ key_center(b, "center"),
+ key_toggle(b, "toggle"),
+ key_zero(b, "zero")
+ {
+ }
};