]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/binarycontrol.h
Keep track of edges in Control
[libs/gui.git] / source / input / binarycontrol.h
index 64e4ab17be4ca1698e78c880a164f299d61b89e3..ff773b8a3fb8f2d225ac01ea387aa5998c6c16a6 100644 (file)
@@ -32,6 +32,8 @@ public:
        void set_threshold(float);
 
        bool get_state() const { return state; }
+       bool was_pressed() const { return rising_edge; }
+       bool was_released() const { return falling_edge; }
 
 private:
        virtual void on_press();