Xonotic
slider_sbfadetime.qc
Go to the documentation of this file.
1 #include "slider_sbfadetime.qh"
2 
4 {
5  entity me;
7  me.configureXonoticScoreboardFadeTimeSlider(me);
8  return me;
9 }
11 {
12  me.configureXonoticTextSlider(me, "hud_panel_scoreboard_fadeinspeed", string_null);
13  me.addValue(me, ZCTX(_("FADESPEED^Slow")), "5 2.5");
14  me.addValue(me, ZCTX(_("FADESPEED^Normal")), "10 5");
15  me.addValue(me, ZCTX(_("FADESPEED^Fast")), "15 7.5");
16  me.addValue(me, ZCTX(_("FADESPEED^Instant")), "0 0");
17  me.configureXonoticTextSliderValues(me);
18 }
20 {
21  me.setValueFromIdentifier_noAnim(me, sprintf("%s %s",
22  cvar_string("hud_panel_scoreboard_fadeinspeed"),
23  cvar_string("hud_panel_scoreboard_fadeoutspeed")
24  ));
25 }
27 {
28  if(me.value >= 0 || me.value < me.nValues)
29  {
30  tokenize_console(me.getIdentifier(me));
31  cvar_set("hud_panel_scoreboard_fadeinspeed", argv(0));
32  cvar_set("hud_panel_scoreboard_fadeoutspeed", argv(1));
33  }
34 }
string string_null
Definition: nil.qh:9
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
void XonoticScoreboardFadeTimeSlider_configureXonoticScoreboardFadeTimeSlider(entity me)
#define ZCTX(s)
Definition: i18n.qh:68
void XonoticScoreboardFadeTimeSlider_saveCvars(entity me)
#define tokenize_console
Definition: dpextensions.qh:24
entity makeXonoticScoreboardFadeTimeSlider()
void XonoticScoreboardFadeTimeSlider_loadCvars(entity me)