Skip to content
Snippets Groups Projects
Unverified Commit c31aecf2 authored by Clément Roblot's avatar Clément Roblot Committed by GitHub
Browse files

Checkbox button debounce (#774)

This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/773



Dragging the mouse with the left button pressed now avoids activating multiple
checkboxes.

Add support for detecting mouse press transition. Added:
```cpp
// The previous mouse event.
Mouse Mouse::previous;

// Return whether the mouse transitionned from:
// released to pressed => IsPressed()
// pressed to pressed => IsHeld()
// pressed to released => IsReleased()
bool Mouse::IsPressed(Button button) const;
bool Mouse::IsHeld(Button button) const;
bool Mouse::IsReleased(Button button) const;
```
A couple of components are now activated when the mouse is pressed,
as opposed to released.

Co-authored-by: default avatarArthurSonzogni <sonzogniarthur@gmail.com>
parent e8589dd5
Branches
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment