1 #ifndef SLIDER_PARTICLES_H
2 #define SLIDER_PARTICLES_H
3 #include "textslider.qc"
4 CLASS(XonoticParticlesSlider, XonoticTextSlider)
5 METHOD(XonoticParticlesSlider, configureXonoticParticlesSlider, void(entity));
6 METHOD(XonoticParticlesSlider, loadCvars, void(entity));
7 METHOD(XonoticParticlesSlider, saveCvars, void(entity));
8 ENDCLASS(XonoticParticlesSlider)
9 entity makeXonoticParticlesSlider();
13 entity makeXonoticParticlesSlider()
16 me = NEW(XonoticParticlesSlider);
17 me.configureXonoticParticlesSlider(me);
20 void XonoticParticlesSlider_configureXonoticParticlesSlider(entity me)
22 me.configureXonoticTextSlider(me, "cl_particles_quality",
23 _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance (default: 1)"));
24 if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^OMG")), "0.4 250 0"); }
25 me.addValue(me, ZCTX(_("PART^Low")), "0.4 500 0");
26 me.addValue(me, ZCTX(_("PART^Medium")), "0.8 750 0");
27 me.addValue(me, ZCTX(_("PART^Normal")), "1.0 1000 1");
28 me.addValue(me, ZCTX(_("PART^High")), "1.0 1500 1");
29 me.addValue(me, ZCTX(_("PART^Ultra")), "1.0 2000 2");
30 if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^Ultimate")), "1.0 3000 2"); }
31 me.configureXonoticTextSliderValues(me);
33 void XonoticParticlesSlider_loadCvars(entity me)
35 me.setValueFromIdentifier(me, sprintf("%s %s %s",
36 cvar_string("cl_particles_quality"),
37 cvar_string("r_drawparticles_drawdistance"),
38 cvar_string("cl_damageeffect")
41 void XonoticParticlesSlider_saveCvars(entity me)
43 if(me.value >= 0 || me.value < me.nValues)
45 tokenize_console(me.getIdentifier(me));
46 cvar_set("cl_particles_quality", argv(0));
47 cvar_set("r_drawparticles_drawdistance", argv(1));
48 cvar_set("cl_damageeffect", argv(2));