ref: 88b562df34f7843a5146203962c11ce18c6656ce
parent: 9c480b1cb18544240f433f90fca7e489eae35aff
author: Simon Howard <[email protected]>
date: Fri Oct 24 16:10:23 EDT 2014
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).
--- a/src/net_gui.c
+++ b/src/net_gui.c
@@ -249,11 +249,19 @@
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 @@
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)