mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Improve mouse support for menu and toggle.
This commit is contained in:
@@ -16,12 +16,14 @@ class Toggle : public Component {
|
||||
~Toggle() override = default;
|
||||
|
||||
// State.
|
||||
int selected = 0;
|
||||
std::vector<std::wstring> entries = {L"On", L"Off"};
|
||||
int selected = 0;
|
||||
int focused = 0;
|
||||
|
||||
Decorator normal_style = dim;
|
||||
Decorator focused_style = inverted;
|
||||
Decorator selected_style = bold;
|
||||
Decorator normal_style = dim;
|
||||
Decorator selected_focused_style = focused_style | selected_style;
|
||||
|
||||
// Callback.
|
||||
std::function<void()> on_change = []() {};
|
||||
|
Reference in New Issue
Block a user