diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/screen.c | 11 | ||||
| -rw-r--r-- | src/screen.h | 4 |
2 files changed, 12 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; |
diff --git a/src/screen.h b/src/screen.h index 9419d5c..8b8c8f8 100644 --- a/src/screen.h +++ b/src/screen.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __SLOTS__SCREEN_H__184802466018249 | 1 | #ifndef __SLOTS__SCREEN_H__184802466018249 |
| 2 | #define __SLOTS__SCREEN_H__184802466018249 | 2 | #define __SLOTS__SCREEN_H__184802466018249 |
| 3 | 3 | ||
| 4 | #include <menu.h> | ||
| 4 | #include <curses.h> | 5 | #include <curses.h> |
| 5 | 6 | ||
| 6 | #define STATIC_ARRSIZE(arr) (sizeof((arr)) / sizeof((arr)[0])) | 7 | #define STATIC_ARRSIZE(arr) (sizeof((arr)) / sizeof((arr)[0])) |
| @@ -68,6 +69,9 @@ struct funcholder { | |||
| 68 | struct spinp { | 69 | struct spinp { |
| 69 | WINDOW *bannerwin; | 70 | WINDOW *bannerwin; |
| 70 | int phrasenum; | 71 | int phrasenum; |
| 72 | |||
| 73 | WINDOW *menuholder; | ||
| 74 | MENU *menu; | ||
| 71 | } spinp; | 75 | } spinp; |
| 72 | 76 | ||
| 73 | struct buyp { | 77 | struct buyp { |
