// function keys
bind F1 vyes
bind F2 vno
-bind F3 spec_ask_forfeit
+bind F3 spec_forfeit
bind F4 ready
bind F5 team_selection_show
bind F6 team_auto
alias team_auto "togglemenu 0; cmd selectteam auto; cmd join"
-// Xonotic 0.9.0 update: menu will change any spec bind to spec_ask_forfeit (and set this cvar to 1)
+// Xonotic 0.9.0 update: menu will change any spec bind to spec_forfeit (and set this cvar to 1)
// TODO remove menu code and this cvar in a later Xonotic version
-seta _spec_ask_forfeit_bindupdate 0
+seta _spec_forfeit_bindupdate 0
+
+seta menu_ask_forfeit 1 "ask for forfeit confirmation"
+alias spec_forfeit0 "spectate"
+alias spec_forfeit1 "spectate \"\" ASK_FORFEIT"
+alias spec_forfeit "spec_ask_forfeit${menu_ask_forfeit}"
alias spec "spectate ${* ?}"
-alias spec_ask_forfeit "spectate \"\" ASK_FORFEIT"
// mutator aliases
alias sandbox "cmd g_sandbox ${* ?}"
if(spectatee_status == -1)
s = sprintf(_("^1Use ^3%s^1 or ^3%s^1 to change the speed"), getcommandkey(_("next weapon"), "weapnext"), getcommandkey(_("previous weapon"), "weapprev"));
else if(!observe_blocked)
- s = sprintf(_("^1Press ^3%s^1 to observe, ^3%s^1 to change camera mode"), getcommandkey(_("observe"), "spec"), getcommandkey(_("drop weapon"), "dropweapon"));
+ s = sprintf(_("^1Press ^3%s^1 to observe, ^3%s^1 to change camera mode"), getcommandkey(_("observe / forfeit"), "spec_forfeit"), getcommandkey(_("drop weapon"), "dropweapon"));
else
s = sprintf(_("^1Press ^3%s^1 to change camera mode"), getcommandkey(_("drop weapon"), "dropweapon"));
break;
#include "dialog_forfeit.qh"
#include "button.qh"
+#include "checkbox.qh"
#include "commandbutton.qh"
#include "textlabel.qh"
me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(1, "menu_ask_forfeit", _("Never ask again")));
}
ATTRIB(XonoticForfeitDialog, title, string, _("Forfeit"));
ATTRIB(XonoticForfeitDialog, name, string, "Forfeit");
ATTRIB(XonoticForfeitDialog, color, vector, SKINCOLOR_DIALOG_QUIT);
- ATTRIB(XonoticForfeitDialog, intendedWidth, float, 0.5);
- ATTRIB(XonoticForfeitDialog, rows, float, 3);
+ ATTRIB(XonoticForfeitDialog, intendedWidth, float, 0.6);
+ ATTRIB(XonoticForfeitDialog, rows, float, 5);
ATTRIB(XonoticForfeitDialog, columns, float, 2);
ENDCLASS(XonoticForfeitDialog)
KEYBIND_HEADER(_("Teamplay"));
KEYBIND_DEF("team_auto" , _("auto-join team"));
KEYBIND_DEF("team_selection_show" , _("team selection"));
- KEYBIND_DEF("spec_ask_forfeit" , _("observe"));
+ KEYBIND_DEF("spec_forfeit" , _("observe / forfeit"));
KEYBIND_EMPTY_LINE();
KEYBIND_HEADER(_("Misc"));
// Xonotic 0.9.0 update
// TODO remove cvar and this code in a later Xonotic version
- if (!cvar("_spec_ask_forfeit_bindupdate"))
+ if (!cvar("_spec_forfeit_bindupdate"))
{
- replace_bind("spec", "spec_ask_forfeit");
- cvar_set("_spec_ask_forfeit_bindupdate", "1");
+ replace_bind("spec", "spec_forfeit");
+ cvar_set("_spec_forfeit_bindupdate", "1");
}
}
void XonoticKeyBinder_loadKeyBinds(entity me)