From: terencehill Date: Mon, 14 Mar 2022 14:31:19 +0000 (+0100) Subject: Game menu dialog: add Servers button X-Git-Tag: xonotic-v0.8.5~129^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=92ab8235c5580f6b26a86416216561e010949855;p=xonotic%2Fxonotic-data.pk3dir.git Game menu dialog: add Servers button --- diff --git a/qcsrc/menu/command/menu_cmd.qc b/qcsrc/menu/command/menu_cmd.qc index 8ba94a786..ce682de00 100644 --- a/qcsrc/menu/command/menu_cmd.qc +++ b/qcsrc/menu/command/menu_cmd.qc @@ -106,6 +106,12 @@ void GameCommand(string theCommand) return; } + if (argv(0) == "servers") + { + m_goto("servers"); + return; + } + if (argv(0) == "profile") { m_goto("profile"); diff --git a/qcsrc/menu/xonotic/dialog_gamemenu.qc b/qcsrc/menu/xonotic/dialog_gamemenu.qc index 5403c1e5f..878928449 100644 --- a/qcsrc/menu/xonotic/dialog_gamemenu.qc +++ b/qcsrc/menu/xonotic/dialog_gamemenu.qc @@ -10,6 +10,9 @@ void XonoticGameMenuDialog_fill(entity me) entity e; me.TR(me); me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Main menu"), '0 0 0', "menu_cmd nexposee", 0)); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Servers"), '0 0 0', "menu_cmd servers", 0)); me.TR(me); me.TDempty(me, 0.1); me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Profile"), '0 0 0', "menu_cmd profile", 0)); diff --git a/qcsrc/menu/xonotic/dialog_gamemenu.qh b/qcsrc/menu/xonotic/dialog_gamemenu.qh index 75ded66c5..272f882fe 100644 --- a/qcsrc/menu/xonotic/dialog_gamemenu.qh +++ b/qcsrc/menu/xonotic/dialog_gamemenu.qh @@ -6,7 +6,7 @@ CLASS(XonoticGameMenuDialog, XonoticRootDialog) ATTRIB(XonoticGameMenuDialog, title, string, _("Game menu")); ATTRIB(XonoticGameMenuDialog, color, vector, SKINCOLOR_DIALOG_QUIT); ATTRIB(XonoticGameMenuDialog, intendedWidth, float, 0.3); - ATTRIB(XonoticGameMenuDialog, rows, float, 11); + ATTRIB(XonoticGameMenuDialog, rows, float, 12); ATTRIB(XonoticGameMenuDialog, columns, float, 1); ATTRIB(XonoticGameMenuDialog, name, string, "GameMenu"); ATTRIB(XonoticGameMenuDialog, requiresConnection, bool, true); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join.qh b/qcsrc/menu/xonotic/dialog_multiplayer_join.qh index a663eb527..38744f366 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join.qh +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join.qh @@ -6,5 +6,7 @@ CLASS(XonoticServerListTab, XonoticTab) ATTRIB(XonoticServerListTab, intendedWidth, float, 0.9); ATTRIB(XonoticServerListTab, rows, float, 23); ATTRIB(XonoticServerListTab, columns, float, 6.5); + + ATTRIB(XonoticServerListTab, name, string, "servers"); ENDCLASS(XonoticServerListTab) entity makeXonoticServerListTab();