1 #include "slider_particles.qh"
3 entity makeXonoticParticlesSlider()
6 me = NEW(XonoticParticlesSlider);
7 me.configureXonoticParticlesSlider(me);
10 void XonoticParticlesSlider_configureXonoticParticlesSlider(entity me)
12 me.configureXonoticTextSlider(me, "cl_particles_quality",
13 _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance"));
14 if(cvar("developer") > 0) { me.addValue(me, ZCTX(_("PART^OMG")), "0.25 250 0"); }
15 me.addValue(me, ZCTX(_("PARTQUAL^Low")), "0.5 500 0");
16 me.addValue(me, ZCTX(_("PARTQUAL^Medium")), "0.75 750 0");
17 me.addValue(me, ZCTX(_("PARTQUAL^Normal")), "1.0 1000 1");
18 me.addValue(me, ZCTX(_("PARTQUAL^High")), "1.5 1500 1");
19 me.addValue(me, ZCTX(_("PARTQUAL^Ultra")), "2.0 2000 2");
20 if(cvar("developer") > 0) { me.addValue(me, ZCTX(_("PARTQUAL^Ultimate")), "3.0 3000 2"); }
21 me.configureXonoticTextSliderValues(me);
23 void XonoticParticlesSlider_loadCvars(entity me)
25 me.setValueFromIdentifier_noAnim(me, sprintf("%s %s %s",
26 cvar_string("cl_particles_quality"),
27 cvar_string("r_drawparticles_drawdistance"),
28 cvar_string("cl_damageeffect")
31 void XonoticParticlesSlider_saveCvars(entity me)
33 if(me.value >= 0 || me.value < me.nValues)
35 tokenize_console(me.getIdentifier(me));
36 cvar_set("cl_particles_quality", argv(0));
37 cvar_set("r_drawparticles_drawdistance", argv(1));
38 cvar_set("cl_damageeffect", argv(2));