From 65f301399f7e9f46229668e4fe48f45afcc2266c Mon Sep 17 00:00:00 2001 From: gullradriel <3157857+gullradriel@users.noreply.github.com> Date: Sat, 4 Jan 2025 03:50:53 +0100 Subject: [PATCH] disabling button on main menu, change labels and add 'icons' (#2466) * disabling button on main menu, change labels and add 'icons' * fix reverse order of buttons --------- Co-authored-by: gullradriel --- firmware/application/ui/ui_btngrid.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/firmware/application/ui/ui_btngrid.cpp b/firmware/application/ui/ui_btngrid.cpp index 4a1f7b93..06a2cc16 100644 --- a/firmware/application/ui/ui_btngrid.cpp +++ b/firmware/application/ui/ui_btngrid.cpp @@ -110,12 +110,12 @@ void BtnGridView::set_arrow_up_enabled(bool enabled) { if (enabled) { if (!arrow_up_enabled) { arrow_up_enabled = true; - button_pgup.set_text("PAGE UP"); + button_pgup.set_text("< PREV"); } } else if (!enabled) { if (arrow_up_enabled) { arrow_up_enabled = false; - button_pgup.set_text(" "); + button_pgup.set_text(" "); } } }; @@ -126,12 +126,12 @@ void BtnGridView::set_arrow_down_enabled(bool enabled) { if (enabled) { if (!arrow_down_enabled) { arrow_down_enabled = true; - button_pgdown.set_text("PAGE DOWN"); + button_pgdown.set_text("NEXT >"); } } else if (!enabled) { if (arrow_down_enabled) { arrow_down_enabled = false; - button_pgdown.set_text(" "); + button_pgdown.set_text(" "); } } }; @@ -228,6 +228,10 @@ NewButton* BtnGridView::item_view(size_t index) const { void BtnGridView::show_arrows_enabled(bool enabled) { show_arrows = enabled; + if (!enabled) { + remove_child(&button_pgup); + remove_child(&button_pgdown); + } } bool BtnGridView::set_highlighted(int32_t new_value) {