// other hud cvars
seta hud_showbinds 1 "what to show in the HUD to indicate certain keys to press: 0 display commands, 1 bound keys, 2 both"
seta hud_showbinds_limit 2 "maximum number of bound keys to show for a command. 0 for unlimited"
+set _hud_showbinds_reload 0 "set it to 1 to reload binds if you changed any. It is reset to 0 automatically"
seta hud_colorflash_alpha 0.5 "starting alpha of the color flash"
hud = getstati(STAT_HUD);
+ if(autocvar__hud_showbinds_reload) // menu can set this one
+ {
+ db_close(binddb);
+ binddb = db_create();
+ cvar_set("_hud_showbinds_reload", "0");
+ }
+
if(checkextension("DP_CSQC_MINFPS_QUALITY"))
view_quality = getproperty(VF_MINFPS_QUALITY);
else
float autocvar_hud_progressbar_alpha;
float autocvar_hud_showbinds;
float autocvar_hud_showbinds_limit;
+float autocvar__hud_showbinds_reload;
float autocvar_hud_shownames;
float autocvar_hud_shownames_enemies;
float autocvar_hud_shownames_crosshairdistance;
if(k != -1)
localcmd("\nbind \"", keynumtostring(k), "\" \"", to, "\"\n");
}
+ if(n)
+ cvar_set("_hud_showbinds_reload", "1");
}
void XonoticKeyBinder_configureXonoticKeyBinder(entity me)
{
}
localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n");
localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
+ cvar_set("_hud_showbinds_reload", "1");
}
void XonoticKeyBinder_editUserbind(entity me, string theName, string theCommandPress, string theCommandRelease)
{
if(!me.userbindEditDialog)
return;
-
+
func = Xonotic_KeyBinds_Functions[me.selectedItem];
if(func == "")
return;
-
+
descr = Xonotic_KeyBinds_Descriptions[me.selectedItem];
if(substring(descr, 0, 1) != "$")
return;
if(!me.userbindEditDialog)
return;
-
+
func = Xonotic_KeyBinds_Functions[me.selectedItem];
if(func == "")
return;
-
+
descr = Xonotic_KeyBinds_Descriptions[me.selectedItem];
if(substring(descr, 0, 1) != "$")
return;
localcmd("\nbind \"", keynumtostring(k), "\" \"", KEY_NOT_BOUND_CMD, "\"\n");
}
localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
+ cvar_set("_hud_showbinds_reload", "1");
}
void XonoticKeyBinder_clickListBoxItem(entity me, float i, vector where)
{