From 07627032a1ce99fde3f74c91a8f3eb1c7a06cc5f Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 10 Mar 2022 21:41:29 +0100 Subject: [PATCH] Close the centerprint welcome message too when closing the welcome dialog --- qcsrc/menu/xonotic/dialog_welcome.qc | 5 +++++ qcsrc/menu/xonotic/dialog_welcome.qh | 1 + 2 files changed, 6 insertions(+) diff --git a/qcsrc/menu/xonotic/dialog_welcome.qc b/qcsrc/menu/xonotic/dialog_welcome.qc index 14dabdc4c..bf2a71163 100644 --- a/qcsrc/menu/xonotic/dialog_welcome.qc +++ b/qcsrc/menu/xonotic/dialog_welcome.qc @@ -17,6 +17,10 @@ void welcomeDialog_resetStrings(entity me) strunzone(me.serverinfo_MOTD); me.serverinfo_MOTD = strzone(_("")); } +void XonoticWelcomeDialog_close(entity me) +{ + SUPER(XonoticWelcomeDialog).close(me); +} void XonoticWelcomeDialog_configureDialog(entity me) { welcomeDialog_resetStrings(me); @@ -46,6 +50,7 @@ void XonoticWelcomeDialog_readInputArgs(entity me, float argsbuf) } ++i; } + localcmd("\nwait; wait; +show_info; wait; wait; -show_info\n"); //me.serverinfo_name_ent.setText(me.serverinfo_name_ent, me.serverinfo_name); me.serverinfo_MOTD_ent.setText(me.serverinfo_MOTD_ent, me.serverinfo_MOTD); me.frame.setText(me.frame, me.serverinfo_name); diff --git a/qcsrc/menu/xonotic/dialog_welcome.qh b/qcsrc/menu/xonotic/dialog_welcome.qh index 44458bfde..5b4881bcf 100644 --- a/qcsrc/menu/xonotic/dialog_welcome.qh +++ b/qcsrc/menu/xonotic/dialog_welcome.qh @@ -10,6 +10,7 @@ CLASS(XonoticWelcomeDialog, XonoticRootDialog) ATTRIB(XonoticWelcomeDialog, columns, float, 4); ATTRIB(XonoticWelcomeDialog, name, string, "Welcome"); + METHOD(XonoticWelcomeDialog, close, void(entity)); METHOD(XonoticWelcomeDialog, configureDialog, void(entity)); METHOD(XonoticWelcomeDialog, readInputArgs, void(entity, float)); ATTRIB(XonoticWelcomeDialog, serverinfo_name, string, string_null); -- 2.39.2