sigc::signal<void, float> signal_motion;
private:
- float value;
- SmoothControl *paired_ctrl;
- float dead_zone;
- float threshold;
+ float value = 0.0f;
+ SmoothControl *paired_ctrl = nullptr;
+ float dead_zone = 0.1f;
+ float threshold = 0.9f;
public:
- SmoothControl();
+ SmoothControl() = default;
SmoothControl(const ControlSource &);
SmoothControl(Device &, ControlSrcType, unsigned);
- virtual ~SmoothControl();
+ ~SmoothControl();
/// Sets the dead zone value. Any value below this will be treated as 0.
void set_dead_zone(float);
float get_value() const { return value; }
private:
- virtual void on_press();
- virtual void on_release();
- virtual void on_motion(float, float);
+ void on_press() override;
+ void on_release() override;
+ void on_motion(float, float) override;
};
} // namespace Input