mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-29 16:39:34 +08:00
Add index to EntryState (#933)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
@@ -123,10 +123,7 @@ class MenuBase : public ComponentBase, public MenuOption {
|
||||
const bool is_selected = (selected() == i);
|
||||
|
||||
const EntryState state = {
|
||||
entries[i],
|
||||
false,
|
||||
is_selected,
|
||||
is_focused,
|
||||
entries[i], false, is_selected, is_focused, i,
|
||||
};
|
||||
|
||||
auto focus_management = (selected_focus_ != i) ? nothing
|
||||
@@ -625,11 +622,8 @@ Component MenuEntry(MenuEntryOption option) {
|
||||
const bool focused = Focused();
|
||||
UpdateAnimationTarget();
|
||||
|
||||
const EntryState state = {
|
||||
label(),
|
||||
false,
|
||||
hovered_,
|
||||
focused,
|
||||
const EntryState state{
|
||||
label(), false, hovered_, focused, Index(),
|
||||
};
|
||||
|
||||
const Element element =
|
||||
|
Reference in New Issue
Block a user