mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-17 09:02:25 +00:00
MenuView: Change add_items arg to initializer_list.
Another code size improvement, and makes maintaining lists of menu items less stupid (you don't need to change the template arg when the item count changes).
This commit is contained in:
@@ -194,12 +194,12 @@ void AboutView::focus() {
|
||||
}
|
||||
|
||||
SetupMenuView::SetupMenuView(NavigationView& nav) {
|
||||
add_items<4>({ {
|
||||
add_items({
|
||||
{ "Date/Time", [&nav](){ nav.push<SetDateTimeView>(); } },
|
||||
{ "Frequency Correction", [&nav](){ nav.push<SetFrequencyCorrectionView>(); } },
|
||||
{ "Antenna Bias Voltage", [&nav](){ nav.push<AntennaBiasSetupView>(); } },
|
||||
{ "Touch", [&nav](){ nav.push<TouchCalibrationView>(); } },
|
||||
} });
|
||||
});
|
||||
on_left = [&nav](){ nav.pop(); };
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user