summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2014-10-24 20:10:23 -0400
committerSimon Howard2014-10-24 20:10:23 -0400
commit88b562df34f7843a5146203962c11ce18c6656ce (patch)
treebf2d716d5eaf41ede4acd8a01002174a104941e8
parent9c480b1cb18544240f433f90fca7e489eae35aff (diff)
downloadchocolate-doom-88b562df34f7843a5146203962c11ce18c6656ce.tar.gz
chocolate-doom-88b562df34f7843a5146203962c11ce18c6656ce.tar.bz2
chocolate-doom-88b562df34f7843a5146203962c11ce18c6656ce.zip
Proceed by pressing enter at netgame warning screen.
If there's some discrepancy between clients who are to play a game together, a warning dialog is displayed. To acknowledge this message and proceed, make the user press enter, not escape, which is counter-intuitive. This fixes #453 (thanks Alexandre-Xavier).
-rw-r--r--src/net_gui.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/net_gui.c b/src/net_gui.c
index 8a05b635..da4afc8f 100644
--- a/src/net_gui.c
+++ b/src/net_gui.c
@@ -249,11 +249,19 @@ static void PrintSHA1Digest(char *s, byte *digest)
printf("\n");
}
+static void CloseWindow(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(window))
+{
+ TXT_CAST_ARG(txt_window_t, window);
+
+ TXT_CloseWindow(window);
+}
+
static void CheckSHA1Sums(void)
{
boolean correct_wad, correct_deh;
boolean same_freedoom;
txt_window_t *window;
+ txt_window_action_t *cont_button;
if (!net_client_received_wait_data || had_warning)
{
@@ -295,8 +303,13 @@ static void CheckSHA1Sums(void)
PrintSHA1Digest("Server", net_client_wait_data.deh_sha1sum);
}
- window = TXT_NewWindow("WARNING");
+ window = TXT_NewWindow("WARNING!");
+
+ cont_button = TXT_NewWindowAction(KEY_ENTER, "Continue");
+ TXT_SignalConnect(cont_button, "pressed", CloseWindow, window);
+ TXT_SetWindowAction(window, TXT_HORIZ_LEFT, NULL);
+ TXT_SetWindowAction(window, TXT_HORIZ_CENTER, cont_button);
TXT_SetWindowAction(window, TXT_HORIZ_RIGHT, NULL);
if (!same_freedoom)