From 5fb47187a690fd4122d17bdf5789af8e0a784807 Mon Sep 17 00:00:00 2001 From: Reed Nightingale Date: Sun, 9 Feb 2020 15:42:37 -0800 Subject: [PATCH] Add definition for movePuck --- menu.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/menu.cpp b/menu.cpp index 43f3ca5..1aa6b8b 100644 --- a/menu.cpp +++ b/menu.cpp @@ -1,4 +1,5 @@ #include "menu.h" +#include "nano_gui.h" bool runSubmenu(Menu_t* const current_menu, void(*const redraw_callback)(), @@ -27,4 +28,16 @@ bool runSubmenu(Menu_t* const current_menu, return true; }//end submenu return false; -} \ No newline at end of file +} + +void movePuck(const Button *const b_old, + const Button *const b_new) +{ + if(nullptr != b_old){ + displayRect(b_old->x,b_old->y,b_old->w,b_old->h,COLOR_INACTIVE_BORDER); + } + if(nullptr != b_new){ + displayRect(b_new->x,b_new->y,b_new->w,b_new->h,COLOR_ACTIVE_BORDER); + } +} +