From 2cd2443eb25b83db23a95b22206aca5ec8fcfc11 Mon Sep 17 00:00:00 2001 From: euquiq <31453004+euquiq@users.noreply.github.com> Date: Mon, 1 Jun 2020 18:52:42 -0300 Subject: [PATCH] UI menu changes (#41) * UI menu changes Changed DEBUG menu style from text / scrollbar into buttons. * Update ui_debug.cpp --- firmware/application/apps/ui_debug.cpp | 14 ++++++++------ firmware/application/apps/ui_debug.hpp | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/firmware/application/apps/ui_debug.cpp b/firmware/application/apps/ui_debug.cpp index a95576dc..d409cd29 100644 --- a/firmware/application/apps/ui_debug.cpp +++ b/firmware/application/apps/ui_debug.cpp @@ -345,13 +345,15 @@ DebugPeripheralsMenuView::DebugPeripheralsMenuView(NavigationView& nav) { DebugMenuView::DebugMenuView(NavigationView& nav) { add_items({ - { "Memory", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + //{ "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } }, + { "Memory", ui::Color::white(), &bitmap_icon_soundboard, [&nav](){ nav.push(); } }, //{ "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "SD Card", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "Peripherals", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "Temperature", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "Controls", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, }); - on_left = [&nav](){ nav.pop(); }; + { "SD Card", ui::Color::white(), &bitmap_icon_file, [&nav](){ nav.push(); } }, + { "Peripherals", ui::Color::white(), &bitmap_icon_debug, [&nav](){ nav.push(); } }, + { "Temperature", ui::Color::white(), &bitmap_icon_transmit, [&nav](){ nav.push(); } }, + { "Controls", ui::Color::white(), &bitmap_icon_utilities, [&nav](){ nav.push(); } }, + }); + set_max_rows(2); // allow wider buttons } /*DebugLCRView::DebugLCRView(NavigationView& nav, std::string lcr_string) { diff --git a/firmware/application/apps/ui_debug.hpp b/firmware/application/apps/ui_debug.hpp index fa7aed37..8d14914b 100644 --- a/firmware/application/apps/ui_debug.hpp +++ b/firmware/application/apps/ui_debug.hpp @@ -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 */