mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-14 12:42:19 -04:00
MenuItem: Misc const and constructor consistency adjustments.
Also moved add_items() body to .cpp file.
This commit is contained in:
parent
9a01d59822
commit
722f9b6886
2 changed files with 10 additions and 9 deletions
|
@ -69,10 +69,16 @@ MenuView::~MenuView() {
|
|||
}
|
||||
}
|
||||
|
||||
void MenuView::add_item(const MenuItem item) {
|
||||
void MenuView::add_item(MenuItem item) {
|
||||
add_child(new MenuItemView { item });
|
||||
}
|
||||
|
||||
void MenuView::add_items(std::initializer_list<MenuItem> items) {
|
||||
for(auto item : items) {
|
||||
add_item(item);
|
||||
}
|
||||
}
|
||||
|
||||
void MenuView::set_parent_rect(const Rect new_parent_rect) {
|
||||
View::set_parent_rect(new_parent_rect);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue