mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-14 20:52:12 -04:00
Merge remote-tracking branch 'upstream/master'
Conflicts: firmware/application/Makefile firmware/application/core_control.cpp firmware/application/touch.cpp firmware/application/ui_debug.cpp firmware/application/ui_debug.hpp firmware/application/ui_navigation.cpp firmware/baseband/baseband_thread.cpp
This commit is contained in:
commit
1b0da68d65
252 changed files with 10752 additions and 7183 deletions
|
@ -36,6 +36,10 @@ struct MenuItem {
|
|||
std::string text;
|
||||
ui::Color color;
|
||||
std::function<void(void)> on_select;
|
||||
|
||||
// TODO: Prevent default-constructed MenuItems.
|
||||
// I managed to construct a menu with three extra, unspecified menu items
|
||||
// in the array that were default constructed...
|
||||
};
|
||||
|
||||
class MenuItemView : public Widget {
|
||||
|
@ -54,8 +58,6 @@ public:
|
|||
|
||||
private:
|
||||
const MenuItem item;
|
||||
|
||||
void set_highlight(const bool value);
|
||||
};
|
||||
|
||||
class MenuView : public View {
|
||||
|
@ -63,7 +65,7 @@ public:
|
|||
std::function<void(void)> on_left;
|
||||
|
||||
MenuView() {
|
||||
flags.focusable = true;
|
||||
set_focusable(true);
|
||||
}
|
||||
|
||||
~MenuView();
|
||||
|
@ -71,7 +73,7 @@ public:
|
|||
void add_item(const MenuItem item);
|
||||
|
||||
template<size_t N>
|
||||
void add_items(const std::array<MenuItem, N> items) {
|
||||
void add_items(const std::array<MenuItem, N>& items) {
|
||||
for(const auto& item : items) {
|
||||
add_item(item);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue