aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/components/Menu.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-10 21:21:46 +0800
committercrupest <crupest@outlook.com>2022-02-10 21:21:46 +0800
commita236a2a146bfcc4eb5c93a85cd99ac330e83a7f5 (patch)
tree32756f8f90df09b37f30a5753cff69207851fc4a /include/cru/ui/components/Menu.h
parent28d7016c32b39656dafa0936cfedb02159f9e7cd (diff)
downloadcru-a236a2a146bfcc4eb5c93a85cd99ac330e83a7f5.tar.gz
cru-a236a2a146bfcc4eb5c93a85cd99ac330e83a7f5.tar.bz2
cru-a236a2a146bfcc4eb5c93a85cd99ac330e83a7f5.zip
...
Diffstat (limited to 'include/cru/ui/components/Menu.h')
-rw-r--r--include/cru/ui/components/Menu.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/cru/ui/components/Menu.h b/include/cru/ui/components/Menu.h
index 99668f62..f4e54c9f 100644
--- a/include/cru/ui/components/Menu.h
+++ b/include/cru/ui/components/Menu.h
@@ -52,15 +52,15 @@ class CRU_UI_API Menu : public Component {
return static_cast<gsl::index>(items_.size());
}
- void AddItem(Component* component) { AddItem(component, GetItemCount()); }
- void AddItem(Component* component, gsl::index index);
- Component* RemoveItem(gsl::index index);
+ void AddItem(Component* component) { AddItemAt(component, GetItemCount()); }
+ void AddItemAt(Component* component, gsl::index index);
+ Component* RemoveItemAt(gsl::index index);
void ClearItems();
void AddTextItem(String text, std::function<void()> on_click) {
- AddTextItem(std::move(text), GetItemCount(), std::move(on_click));
+ AddTextItemAt(std::move(text), GetItemCount(), std::move(on_click));
}
- void AddTextItem(String text, Index index, std::function<void()> on_click);
+ void AddTextItemAt(String text, Index index, std::function<void()> on_click);
void SetOnItemClick(std::function<void(Index)> on_item_click) {
on_item_click_ = std::move(on_item_click);