]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/smoothcontrol.h
Improve SmoothControl range API
[libs/gui.git] / source / input / smoothcontrol.h
index fb6f84e41e2ff64ceee262656d6ac9cc96c27a60..f16177b2b2ea0076dc176ab9b0f7da76ec747506 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef MSP_GBASE_SMOOTHCONTROL_H_
-#define MSP_GBASE_SMOOTHCONTROL_H_
+#ifndef MSP_INPUT_SMOOTHCONTROL_H_
+#define MSP_INPUT_SMOOTHCONTROL_H_
 
 #include "control.h"
 
@@ -34,9 +34,13 @@ public:
        /// Sets the dead zone value.  Any value below this will be treated as 0.
        void set_dead_zone(float);
 
-       /// Sets the max-out threshold.  Any value above this will be treated as 1.
+       /** Sets the max-out threshold.  Any value above this will be treated as 1.
+       A negative value can be used to disable the threshold entirely. */
        void set_threshold(float);
 
+       /// Sets dead zone and threshold in a single function call.
+       void set_range(float, float);
+
        void pair(SmoothControl *ctrl);
        float get_value() const { return value; }