bind PAUSE pause
bind F9 "cl_cmd hud minigame"
bind F10 menu_showquitdialog
-bind F11 menu_showquitdialog
+bind F11 menu_showgamemenudialog
bind F12 screenshot
bind F4 ready
alias menu_showhudoptions "menu_cmd directpanelhudmenu ${* ?}"
alias menu_showsandboxtools "menu_cmd directmenu SandboxTools"
alias menu_showquitdialog "menu_cmd directmenu Quit"
+alias menu_showgamemenudialog "menu_cmd directmenu GameMenu"
alias menu_showmonstertools "menu_cmd directmenu MonsterTools"
// command executed before loading a map by the menu
return;
}
+ if (argv(0) == "nexposee")
+ {
+ m_goto("nexposee");
+ return;
+ }
+
+ if (argv(0) == "profile")
+ {
+ m_goto("profile");
+ return;
+ }
+
if (argv(0) == "skinselect")
{
m_goto("skinselector");
return;
}
+ if (argv(0) == "inputsettings")
+ {
+ m_goto("inputsettings");
+ return;
+ }
+
if (argv(0) == "videosettings")
{
m_goto("videosettings");
if (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))
{
m_hide();
+ return;
}
- else
- {
- m_activate_window(main.mainNexposee);
- m_display();
- }
+ itemname = "nexposee";
+ }
+
+ if (itemname == "nexposee")
+ {
+ // unlike 'togglemenu 1', this closes modal and root dialogs if opened
+ m_activate_window(main.mainNexposee);
+ m_display();
}
else
{
#include <menu/xonotic/dialog.qc>
#include <menu/xonotic/dialog_credits.qc>
#include <menu/xonotic/dialog_firstrun.qc>
+#include <menu/xonotic/dialog_gamemenu.qc>
#include <menu/xonotic/dialog_hudpanel_ammo.qc>
#include <menu/xonotic/dialog_hudpanel_centerprint.qc>
#include <menu/xonotic/dialog_hudpanel_chat.qc>
#include <menu/xonotic/dialog.qh>
#include <menu/xonotic/dialog_credits.qh>
#include <menu/xonotic/dialog_firstrun.qh>
+#include <menu/xonotic/dialog_gamemenu.qh>
#include <menu/xonotic/dialog_hudpanel_ammo.qh>
#include <menu/xonotic/dialog_hudpanel_centerprint.qh>
#include <menu/xonotic/dialog_hudpanel_chat.qh>
--- /dev/null
+#include "dialog_gamemenu.qh"
+
+#include "textlabel.qh"
+#include "commandbutton.qh"
+#include "leavematchbutton.qh"
+#include "button.qh"
+
+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(_("Profile"), '0 0 0', "menu_cmd profile", 0));
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Settings"), '0 0 0', "menu_cmd videosettings", 0));
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Keys"), '0 0 0', "menu_cmd inputsettings", 0));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Quick menu"), '0 0 0', "quickmenu", COMMANDBUTTON_CLOSE));
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Join!"), '0 0 0', "join", COMMANDBUTTON_CLOSE));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Spectate"), '0 0 0', "spec", COMMANDBUTTON_CLOSE));
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticLeaveMatchButton('0 0 0', COMMANDBUTTON_CLOSE));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Quit Xonotic"), '1 0 0', "echo ]quit; quit", 0));
+}
--- /dev/null
+#pragma once
+
+#include "rootdialog.qh"
+CLASS(XonoticGameMenuDialog, XonoticRootDialog)
+ METHOD(XonoticGameMenuDialog, fill, void(entity));
+ 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, columns, float, 1);
+ ATTRIB(XonoticGameMenuDialog, name, string, "GameMenu");
+ ATTRIB(XonoticGameMenuDialog, requiresConnection, bool, true);
+ENDCLASS(XonoticGameMenuDialog)
ATTRIB(XonoticProfileTab, columns, float, 6.1); // added extra .2 for center space
ATTRIB(XonoticProfileTab, playerNameLabel, entity);
ATTRIB(XonoticProfileTab, playerNameLabelAlpha, float, SKINALPHA_HEADER);
+ ATTRIB(XonoticProfileTab, name, string, "profile");
ENDCLASS(XonoticProfileTab)
entity makeXonoticProfileTab();
ATTRIB(XonoticInputSettingsTab, intendedWidth, float, 0.9);
ATTRIB(XonoticInputSettingsTab, rows, float, 15.5);
ATTRIB(XonoticInputSettingsTab, columns, float, 6.2); // added extra .2 for center space
+ ATTRIB(XonoticInputSettingsTab, name, string, "inputsettings");
ENDCLASS(XonoticInputSettingsTab)
entity makeXonoticInputSettingsTab();
KEYBIND_DEF("+use" , _("drop key/flag, exit vehicle"));
KEYBIND_DEF("kill" , _("suicide / respawn"));
KEYBIND_DEF("quickmenu" , _("quick menu"));
+ KEYBIND_DEF("menu_showgamemenudialog" , _("game menu"));
KEYBIND_EMPTY_LINE();
KEYBIND_HEADER(_("User defined"));
// miscellaneous dialogs
+ i = NEW(XonoticGameMenuDialog);
+ i.configureDialog(i);
+ me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
i = NEW(XonoticTeamSelectDialog);
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);