-
- Downloads
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:ArthurSonzogni <sonzogniarthur@gmail.com>
Showing
- CHANGELOG.md 20 additions, 0 deletionsCHANGELOG.md
- CMakeLists.txt 1 addition, 0 deletionsCMakeLists.txt
- include/ftxui/component/mouse.hpp 8 additions, 0 deletionsinclude/ftxui/component/mouse.hpp
- include/ftxui/component/screen_interactive.hpp 1 addition, 0 deletionsinclude/ftxui/component/screen_interactive.hpp
- src/ftxui/component/button.cpp 1 addition, 2 deletionssrc/ftxui/component/button.cpp
- src/ftxui/component/checkbox.cpp 1 addition, 2 deletionssrc/ftxui/component/checkbox.cpp
- src/ftxui/component/input.cpp 1 addition, 2 deletionssrc/ftxui/component/input.cpp
- src/ftxui/component/menu.cpp 2 additions, 4 deletionssrc/ftxui/component/menu.cpp
- src/ftxui/component/mouse.cpp 36 additions, 0 deletionssrc/ftxui/component/mouse.cpp
- src/ftxui/component/radiobox.cpp 1 addition, 2 deletionssrc/ftxui/component/radiobox.cpp
- src/ftxui/component/resizable_split.cpp 1 addition, 2 deletionssrc/ftxui/component/resizable_split.cpp
- src/ftxui/component/screen_interactive.cpp 6 additions, 0 deletionssrc/ftxui/component/screen_interactive.cpp
- src/ftxui/component/slider.cpp 1 addition, 2 deletionssrc/ftxui/component/slider.cpp
- src/ftxui/component/window.cpp 1 addition, 2 deletionssrc/ftxui/component/window.cpp
Loading
Please register or sign in to comment