summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-10 23:05:52 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-10 23:05:52 +0200
commit87835abd977faea04a6926a26eed300a2dbb12b3 (patch)
tree7e8d33676678e2240d5368fca8465712b24285cd /screen_ui.cpp
parentam c22f5774: am 6b0dd1d7: Merge "Move "Mount /system" to the main menu." (diff)
parentam 5d1630a9: Merge "Fix ScreenRecoveryUI to handle devices without power/up/down." (diff)
downloadandroid_bootable_recovery-87835abd977faea04a6926a26eed300a2dbb12b3.tar
android_bootable_recovery-87835abd977faea04a6926a26eed300a2dbb12b3.tar.gz
android_bootable_recovery-87835abd977faea04a6926a26eed300a2dbb12b3.tar.bz2
android_bootable_recovery-87835abd977faea04a6926a26eed300a2dbb12b3.tar.lz
android_bootable_recovery-87835abd977faea04a6926a26eed300a2dbb12b3.tar.xz
android_bootable_recovery-87835abd977faea04a6926a26eed300a2dbb12b3.tar.zst
android_bootable_recovery-87835abd977faea04a6926a26eed300a2dbb12b3.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 6d8df68b3..b62417f5f 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -185,6 +185,9 @@ void ScreenRecoveryUI::SetColor(UIElement e) {
case MENU_SEL_BG:
gr_color(0, 106, 157, 255);
break;
+ case MENU_SEL_BG_ACTIVE:
+ gr_color(0, 156, 100, 255);
+ break;
case MENU_SEL_FG:
gr_color(255, 255, 255, 255);
break;
@@ -220,7 +223,7 @@ void ScreenRecoveryUI::draw_screen_locked() {
if (i == menu_top + menu_sel) {
// draw the highlight bar
- SetColor(MENU_SEL_BG);
+ SetColor(IsLongPress() ? MENU_SEL_BG_ACTIVE : MENU_SEL_BG);
gr_fill(0, y-2, gr_fb_width(), y+char_height+2);
// white text of selected item
SetColor(MENU_SEL_FG);
@@ -638,3 +641,9 @@ void ScreenRecoveryUI::Redraw() {
update_screen_locked();
pthread_mutex_unlock(&updateMutex);
}
+
+void ScreenRecoveryUI::KeyLongPress(int) {
+ // Redraw so that if we're in the menu, the highlight
+ // will change color to indicate a successful long press.
+ Redraw();
+}