X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fbinarycontrol.h;h=0d71bdc3349e0dc4afedf3a5a9423528ca82977a;hb=3c5bbaeadb33d288c0f9e487b52904b7ed7e4319;hp=ff773b8a3fb8f2d225ac01ea387aa5998c6c16a6;hpb=8b985716894cd5f585a04a6253dd67060abe0b2f;p=libs%2Fgui.git diff --git a/source/input/binarycontrol.h b/source/input/binarycontrol.h index ff773b8..0d71bdc 100644 --- a/source/input/binarycontrol.h +++ b/source/input/binarycontrol.h @@ -18,14 +18,14 @@ public: sigc::signal signal_release; private: - bool state; - float threshold; + bool state = false; + float threshold = 0.5f; public: - BinaryControl(); + BinaryControl() = default; BinaryControl(const ControlSource &); BinaryControl(Device &, ControlSrcType, unsigned); - virtual ~BinaryControl(); + ~BinaryControl(); /** Sets the threshold between states for axis sources. No effect on button sources */ @@ -36,9 +36,9 @@ public: bool was_released() const { return falling_edge; } 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