Xonotic
slider_sbfadetime.qc File Reference
+ Include dependency graph for slider_sbfadetime.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

entity makeXonoticScoreboardFadeTimeSlider ()
 
void XonoticScoreboardFadeTimeSlider_configureXonoticScoreboardFadeTimeSlider (entity me)
 
void XonoticScoreboardFadeTimeSlider_loadCvars (entity me)
 
void XonoticScoreboardFadeTimeSlider_saveCvars (entity me)
 

Function Documentation

◆ makeXonoticScoreboardFadeTimeSlider()

entity makeXonoticScoreboardFadeTimeSlider ( )

Definition at line 3 of file slider_sbfadetime.qc.

References entity(), and NEW.

4 {
5  entity me;
7  me.configureXonoticScoreboardFadeTimeSlider(me);
8  return me;
9 }
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
+ Here is the call graph for this function:

◆ XonoticScoreboardFadeTimeSlider_configureXonoticScoreboardFadeTimeSlider()

void XonoticScoreboardFadeTimeSlider_configureXonoticScoreboardFadeTimeSlider ( entity  me)

Definition at line 10 of file slider_sbfadetime.qc.

References string_null, and ZCTX.

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 }
string string_null
Definition: nil.qh:9
#define ZCTX(s)
Definition: i18n.qh:68

◆ XonoticScoreboardFadeTimeSlider_loadCvars()

void XonoticScoreboardFadeTimeSlider_loadCvars ( entity  me)

Definition at line 19 of file slider_sbfadetime.qc.

References cvar_string().

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 }
+ Here is the call graph for this function:

◆ XonoticScoreboardFadeTimeSlider_saveCvars()

void XonoticScoreboardFadeTimeSlider_saveCvars ( entity  me)

Definition at line 26 of file slider_sbfadetime.qc.

References argv(), cvar_set(), and tokenize_console.

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 }
#define tokenize_console
Definition: dpextensions.qh:24
+ Here is the call graph for this function: