Merge pull request #6 from eried/master

UI menu changes (#41)
This commit is contained in:
Gregory Fenton 2020-06-02 11:04:53 +01:00 committed by GitHub
commit 0d5798ac30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -345,13 +345,15 @@ DebugPeripheralsMenuView::DebugPeripheralsMenuView(NavigationView& nav) {
DebugMenuView::DebugMenuView(NavigationView& nav) {
add_items({
{ "Memory", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugMemoryView>(); } },
//{ "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } },
{ "Memory", ui::Color::white(), &bitmap_icon_soundboard, [&nav](){ nav.push<DebugMemoryView>(); } },
//{ "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } },
{ "SD Card", ui::Color::white(), nullptr, [&nav](){ nav.push<SDCardDebugView>(); } },
{ "Peripherals", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugPeripheralsMenuView>(); } },
{ "Temperature", ui::Color::white(), nullptr, [&nav](){ nav.push<TemperatureView>(); } },
{ "Controls", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugControlsView>(); } }, });
on_left = [&nav](){ nav.pop(); };
{ "SD Card", ui::Color::white(), &bitmap_icon_file, [&nav](){ nav.push<SDCardDebugView>(); } },
{ "Peripherals", ui::Color::white(), &bitmap_icon_debug, [&nav](){ nav.push<DebugPeripheralsMenuView>(); } },
{ "Temperature", ui::Color::white(), &bitmap_icon_transmit, [&nav](){ nav.push<TemperatureView>(); } },
{ "Controls", ui::Color::white(), &bitmap_icon_utilities, [&nav](){ nav.push<DebugControlsView>(); } },
});
set_max_rows(2); // allow wider buttons
}
/*DebugLCRView::DebugLCRView(NavigationView& nav, std::string lcr_string) {

View File

@ -292,9 +292,10 @@ public:
DebugPeripheralsMenuView(NavigationView& nav);
};
class DebugMenuView : public MenuView {
class DebugMenuView : public BtnGridView {
public:
DebugMenuView(NavigationView& nav);
std::string title() const override { return "Debug"; };
};
} /* namespace ui */