aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/components/Menu.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-02-08 15:12:29 +0800
committercrupest <crupest@outlook.com>2024-02-08 15:12:29 +0800
commitf3af6c7e5b46f4209a4981e5d7be217368f40b15 (patch)
treee932747ad91a718abb667a6170b21f1521a04d1e /include/cru/ui/components/Menu.h
parentbfe23251a54b036abef9241ba0994c9e51db25b2 (diff)
downloadcru-f3af6c7e5b46f4209a4981e5d7be217368f40b15.tar.gz
cru-f3af6c7e5b46f4209a4981e5d7be217368f40b15.tar.bz2
cru-f3af6c7e5b46f4209a4981e5d7be217368f40b15.zip
Get rid of GSL.
Diffstat (limited to 'include/cru/ui/components/Menu.h')
-rw-r--r--include/cru/ui/components/Menu.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/cru/ui/components/Menu.h b/include/cru/ui/components/Menu.h
index f4e54c9f..82766aa5 100644
--- a/include/cru/ui/components/Menu.h
+++ b/include/cru/ui/components/Menu.h
@@ -48,13 +48,11 @@ class CRU_UI_API Menu : public Component {
public:
controls::Control* GetRootControl() override { return &container_; }
- gsl::index GetItemCount() const {
- return static_cast<gsl::index>(items_.size());
- }
+ Index GetItemCount() const { return static_cast<Index>(items_.size()); }
void AddItem(Component* component) { AddItemAt(component, GetItemCount()); }
- void AddItemAt(Component* component, gsl::index index);
- Component* RemoveItemAt(gsl::index index);
+ void AddItemAt(Component* component, Index index);
+ Component* RemoveItemAt(Index index);
void ClearItems();
void AddTextItem(String text, std::function<void()> on_click) {