summaryrefslogtreecommitdiffhomepage
path: root/gui/settings.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-18 23:08:30 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-18 23:08:30 +0100
commite0866f30d25abd62fadb4b29fff90143c288e9ff (patch)
tree8e482e9d549e6bed4f6843d103b39c2591cb92d8 /gui/settings.cpp
parentee7a635a4c2222b8a77f26956dadcd9d515536a7 (diff)
logic: change relative translation triggering
Relative translation mode now has three states: - disabled - always enabled - enabled when not aiming In the third mode, looking very close to center disables reltrans. The exact values aren't final.
Diffstat (limited to 'gui/settings.cpp')
-rw-r--r--gui/settings.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/gui/settings.cpp b/gui/settings.cpp
index fe0b3261..fc7cde19 100644
--- a/gui/settings.cpp
+++ b/gui/settings.cpp
@@ -54,15 +54,24 @@ options_dialog::options_dialog(std::function<void(bool)> pause_keybindings) :
tie_setting(main.center_at_startup, ui.center_at_startup);
- tie_setting(main.tcomp_p, ui.tcomp_enable);
+ const reltrans_state reltrans_modes[] = {
+ reltrans_disabled,
+ reltrans_enabled,
+ reltrans_non_center,
+ };
+
+ for (unsigned k = 0; k < 3; k++)
+ ui.reltrans_mode->setItemData(k, int(reltrans_modes[k]));
+
+ tie_setting(main.reltrans_mode, ui.reltrans_mode);
- tie_setting(main.tcomp_disable_tx, ui.tcomp_tx_disable);
- tie_setting(main.tcomp_disable_ty, ui.tcomp_ty_disable);
- tie_setting(main.tcomp_disable_tz, ui.tcomp_tz_disable);
+ tie_setting(main.reltrans_disable_tx, ui.tcomp_tx_disable);
+ tie_setting(main.reltrans_disable_ty, ui.tcomp_ty_disable);
+ tie_setting(main.reltrans_disable_tz, ui.tcomp_tz_disable);
- tie_setting(main.tcomp_disable_src_yaw, ui.tcomp_src_yaw_disable);
- tie_setting(main.tcomp_disable_src_pitch, ui.tcomp_src_pitch_disable);
- tie_setting(main.tcomp_disable_src_roll, ui.tcomp_src_roll_disable);
+ tie_setting(main.reltrans_disable_src_yaw, ui.tcomp_src_yaw_disable);
+ tie_setting(main.reltrans_disable_src_pitch, ui.tcomp_src_pitch_disable);
+ tie_setting(main.reltrans_disable_src_roll, ui.tcomp_src_roll_disable);
tie_setting(main.neck_z, ui.neck_z);