9 me.configureXonoticSliderCheckBox(me, theOffValue, isInverted, theControlledSlider, theText);
14 me.offValue = theOffValue;
15 me.inverted = isInverted;
16 me.checked = (theControlledSlider.value == theOffValue);
17 if(theControlledSlider.value ==
median(theControlledSlider.valueMin, theControlledSlider.value, theControlledSlider.valueMax))
18 me.savedValue = theControlledSlider.value;
20 me.savedValue = theControlledSlider.valueMin;
21 me.controlledSlider = theControlledSlider;
22 me.configureCheckBox(me, theText, me.fontSize, me.image);
23 me.controlledCvar = theControlledSlider.controlledCvar;
24 me.tooltip = theControlledSlider.tooltip;
28 me.checked = ((me.controlledSlider.value == me.offValue) != me.inverted);
29 if(me.controlledSlider.value ==
median(me.controlledSlider.valueMin, me.controlledSlider.value, me.controlledSlider.valueMax))
30 me.savedValue = me.controlledSlider.value;
38 if(val == me.inverted)
39 me.controlledSlider.setValue(me.controlledSlider,
median(me.controlledSlider.valueMin, me.savedValue, me.controlledSlider.valueMax));
41 me.controlledSlider.setValue(me.controlledSlider, me.offValue);
ERASEABLE float median(float a, float b, float c)
void XonoticSliderCheckBox_draw(entity me)
entity makeXonoticSliderCheckBox(float theOffValue, float isInverted, entity theControlledSlider, string theText)
void XonoticSliderCheckBox_setChecked(entity me, float val)
void XonoticSliderCheckBox_configureXonoticSliderCheckBox(entity me, float theOffValue, float isInverted, entity theControlledSlider, string theText)