mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-10 08:39:29 +00:00
UI and bug fixes (#3164)
* Fix BLE RX RSSI and Channel scale * Properly reset gradient index 0 * Use move constructor in MenuView::add_item * Avoid erasing during iteration * Fix gradient rounding. Extend to end of table * Add comment to add_item
This commit is contained in:
@@ -83,7 +83,10 @@ class MenuView : public View {
|
||||
|
||||
~MenuView();
|
||||
|
||||
void add_item(MenuItem new_item);
|
||||
// This function takes a temporary to avoid copies and heap allocations.
|
||||
// To pass a variable 'item', use add_item(std::move(item)),
|
||||
// or construct the MenuItem in the call, add_item(MenuItem{...})
|
||||
void add_item(MenuItem&& new_item);
|
||||
void add_items(std::initializer_list<MenuItem> new_items);
|
||||
void clear();
|
||||
size_t item_count() const;
|
||||
|
||||
Reference in New Issue
Block a user