menue.h/cpp: add member to get item id by name

This commit is contained in:
2021-07-19 05:50:08 +02:00
parent 124fe983e8
commit 4df4ea1ac5
2 changed files with 14 additions and 1 deletions

View File

@@ -639,7 +639,8 @@ class CMenuWidget : public CMenuTarget, public CComponentsSignals
void resetWidget(bool delete_items = false);
void insertItem(const uint& item_id, CMenuItem* menuItem);
void removeItem(const uint& item_id);
int getItemId(CMenuItem* menuItem);
int getItemId(CMenuItem *menuItem);
int getItemId(const char *name);
int getItemsCount()const{return items.size();};
CMenuItem* getItem(const uint& item_id);
virtual void paint();