X11: add new player selection dialog

The dialog shows the player's name, race, role, gender, and
alignment in a single window, similar to the Qt4 dialog.
Also allows randomizing the character selection.

Use the dialog by setting OPTIONS=player_selection:dialog
This commit is contained in:
Pasi Kallinen
2017-10-13 22:41:33 +03:00
parent 20d8cb4238
commit 7b156bf704
7 changed files with 980 additions and 5 deletions

View File

@@ -696,4 +696,18 @@ get_unix_pw()
return pw;
}
char *
get_login_name()
{
static char buf[BUFSZ];
struct passwd *pw = get_unix_pw();
buf[0] = '\0';
if (pw)
(void)strcpy(buf, pw->pw_name);
return buf;
}
/*unixmain.c*/