From 4439e372e743ab41be2d33c7242b682bd81bcb93 Mon Sep 17 00:00:00 2001 From: anon Date: Fri, 4 Aug 2023 20:21:45 +0200 Subject: [PATCH] colored mode field --- src/display.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/display.c b/src/display.c index a31b8e0..2fd32de 100644 --- a/src/display.c +++ b/src/display.c @@ -203,7 +203,13 @@ static inline void display_frame(){ static inline void display_mode(){ for(int i = 0; i < FIELDS; ++i){ - mvwprintw(wmode, i, 0, "%s %s", fields[i].text1, fields[i].text2); + if(i == field){ + wattron(wmode, A_REVERSE); + mvwprintw(wmode, i, 0, "%s %s", fields[i].text1, fields[i].text2); + wattroff(wmode, A_REVERSE); + }else{ + mvwprintw(wmode, i, 0, "%s %s", fields[i].text1, fields[i].text2); + } } }