From e51f37f52c4452be1c2cacf5969e6d754eaecc70 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Fri, 30 Aug 2024 19:29:53 -0500 Subject: Put passphrase on main window --- src/screen.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/screen.c') diff --git a/src/screen.c b/src/screen.c index e70bf21..d5b7f2b 100644 --- a/src/screen.c +++ b/src/screen.c @@ -181,7 +181,7 @@ int init_custom_menu_format(WINDOW *menuholder, MENU *menu, const int fmtdim[2], return 0; } -WINDOW* create_banner(int col, int randomnum) { +WINDOW* create_banner(int col, int randomnum, const char *passphrase) { // Create the banner window WINDOW *phrase = newwin(1, col, 0, 0); if(phrase == NULL) { @@ -191,6 +191,13 @@ WINDOW* create_banner(int col, int randomnum) { wbkgd(phrase, COLOR_PAIR(CCP_BANNER)); mvwaddstr(phrase, 0, 1, "VX-GAMBLEGROUND: "); waddstr(phrase, phrases[randomnum]); + + char *pass = NULL; + if(asprintf(&pass, "Passphrase=%s", passphrase) < 0) + error(1, errno, "[VX-GAMBLEGROUND] asprintf broke"); + mvwaddnstr(phrase, 0, col - strlen(pass) - 2, pass, strlen(pass)); + free(pass); + wnoutrefresh(phrase); return phrase; -- cgit v1.2.3