mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-24 11:40:34 +08:00
Fix comment.
This commit is contained in:
parent
4aa8592d7d
commit
c86bd1497c
@ -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);
|
||||||
|
@ -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) {
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user