Add index to EntryState (#933)

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Herring
2024-09-30 23:18:59 +02:00
committed by GitHub
parent dfb9558eaf
commit 1d40687a40
9 changed files with 74 additions and 22 deletions

View File

@@ -44,6 +44,7 @@ class ComponentBase {
ComponentBase* Parent() const;
Component& ChildAt(size_t i);
size_t ChildCount() const;
int Index() const;
void Add(Component children);
void Detach();
void DetachAllChildren();

View File

@@ -25,6 +25,7 @@ struct EntryState {
bool state; ///< The state of the button/checkbox/radiobox
bool active; ///< Whether the entry is the active one.
bool focused; ///< Whether the entry is one focused by the user.
int index; ///< Index of the entry when applicable or -1.
};
struct UnderlineOption {