summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2024-07-27 01:06:08 -0500
committer@syxhe <https://t.me/syxhe>2024-07-27 01:06:08 -0500
commit78d7f29b532705c5997e565539d9c250449cd061 (patch)
tree7b65108c481cd7828a5a02418cecc09d79ed7610 /src/screen.c
parent1d46925315b40b1bdbc44d1714c366589d153948 (diff)
Menu now also updates color
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/screen.c b/src/screen.c
index 626b1b1..749054b 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -138,7 +138,7 @@ static int docolors(void) {
138 init_rgb_color(CC_WHITE, 255, 255, 255); 138 init_rgb_color(CC_WHITE, 255, 255, 255);
139 139
140 init_pair(CCP_BANNER, CC_WHITE, CURSES_BLUE); 140 init_pair(CCP_BANNER, CC_WHITE, CURSES_BLUE);
141 init_pair(CCP_TESTING, CC_WHITE, CC_RED); 141 init_pair(CCP_TESTING, CC_RED, CC_WHITE);
142 } else { 142 } else {
143 endwin(); 143 endwin();
144 error(1, ENOTSUP, "[VX-GAMBLEGROUND] Colors are not supported on your terminal"); 144 error(1, ENOTSUP, "[VX-GAMBLEGROUND] Colors are not supported on your terminal");
@@ -248,6 +248,8 @@ int main() {
248 248
249 userfuncs[0].params.spinp.bannerwin = banner; 249 userfuncs[0].params.spinp.bannerwin = banner;
250 userfuncs[0].params.spinp.phrasenum = randomnum; 250 userfuncs[0].params.spinp.phrasenum = randomnum;
251 userfuncs[0].params.spinp.menuholder = menuholder;
252 userfuncs[0].params.spinp.menu = menu;
251 253
252 // Get user input and deal with the menu 254 // Get user input and deal with the menu
253 while((c = wgetch(menuholder)) != KEY_F(4)) { 255 while((c = wgetch(menuholder)) != KEY_F(4)) {
@@ -312,10 +314,13 @@ int spin(void *spinp) {
312 314
313 // Change the color to testing for the banner 315 // Change the color to testing for the banner
314 wbkgd(p->bannerwin, COLOR_PAIR(CCP_TESTING)); 316 wbkgd(p->bannerwin, COLOR_PAIR(CCP_TESTING));
315 mvwaddstr(p->bannerwin, 0, 1, "VX-GAMBLEGROUND: ");
316 waddstr(p->bannerwin, phrases[p->phrasenum]);
317 wnoutrefresh(p->bannerwin); 317 wnoutrefresh(p->bannerwin);
318 318
319 // Change the color to testing for the menu
320 wbkgd(p->menuholder, COLOR_PAIR(CCP_TESTING));
321 set_menu_back(p->menu, COLOR_PAIR(CCP_TESTING));
322 wnoutrefresh(p->menuholder);
323
319 doupdate(); 324 doupdate();
320 325
321 return 0; 326 return 0;