summaryrefslogtreecommitdiffhomepage
path: root/opentrack-compat/options.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-03 13:42:42 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-03 13:52:12 +0200
commit3753ae9ba74fde7464c101fcdbc99b1bd83ce647 (patch)
tree975c011cda9806ecb0d79f67985505fd65ed6920 /opentrack-compat/options.hpp
parent5100661c2d7c820638fa49a8e27dceb6685e39b7 (diff)
compat/options: fix and simplify slider support
- Introduce rounding. Before, slider pos didn't correspond to the saved setting until it "converged" several saves later. - Move copy-pasted code to .cpp file.
Diffstat (limited to 'opentrack-compat/options.hpp')
-rw-r--r--opentrack-compat/options.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/opentrack-compat/options.hpp b/opentrack-compat/options.hpp
index 3e5ecbf4..86c699d6 100644
--- a/opentrack-compat/options.hpp
+++ b/opentrack-compat/options.hpp
@@ -65,6 +65,8 @@ namespace options
double cur() const { return cur_; }
double min() const { return min_; }
double max() const { return max_; }
+ slider_value update_from_slider(int pos, int q_min, int q_max) const;
+ int to_slider_pos(int q_min, int q_max) const;
};
}