UI menu changes (#41)

* UI menu changes

Changed DEBUG menu style from text / scrollbar into buttons.

* Update ui_debug.cpp
This commit is contained in:
euquiq 2020-06-01 18:52:42 -03:00 committed by GitHub
parent 59b310dff5
commit 2cd2443eb2
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 */