Fix comment.

This commit is contained in:
ArthurSonzogni 2024-09-30 23:16:45 +02:00
parent 4aa8592d7d
commit c86bd1497c
No known key found for this signature in database
GPG Key ID: 41D98248C074CD6C
3 changed files with 3 additions and 11 deletions

View File

@ -28,11 +28,7 @@ class CheckboxBase : public ComponentBase, public CheckboxOption {
const bool is_active = Active(); const bool is_active = Active();
auto focus_management = is_focused ? focus : is_active ? select : nothing; auto focus_management = is_focused ? focus : is_active ? select : nothing;
auto entry_state = EntryState{ auto entry_state = EntryState{
*label, *label, *checked, is_active, is_focused || hovered_, -1,
*checked,
is_active,
is_focused || hovered_,
-1,
}; };
auto element = (transform ? transform : CheckboxOption::Simple().transform)( auto element = (transform ? transform : CheckboxOption::Simple().transform)(
entry_state); entry_state);

View File

@ -51,7 +51,7 @@ size_t ComponentBase::ChildCount() const {
return children_.size(); return children_.size();
} }
/// @brief Return index of child or -1 if not found. /// @brief Return index of the component in its parent. -1 if no parent.
/// @ingroup component /// @ingroup component
int ComponentBase::Index() const { int ComponentBase::Index() const {
if (parent_ == nullptr) { if (parent_ == nullptr) {

View File

@ -40,11 +40,7 @@ class RadioboxBase : public ComponentBase, public RadioboxOption {
: is_menu_focused ? focus : is_menu_focused ? focus
: select; : select;
auto state = EntryState{ auto state = EntryState{
entries[i], entries[i], selected() == i, is_selected, is_focused, i,
selected() == i,
is_selected,
is_focused,
i,
}; };
auto element = auto element =
(transform ? transform : RadioboxOption::Simple().transform)(state); (transform ? transform : RadioboxOption::Simple().transform)(state);