]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/checkbox_slider_invalid.c
Start of uncrusticracy script, and kill trailing whitespace in all sources.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / checkbox_slider_invalid.c
index ea05c3fd067dd63699246b247c1a92f8aa27aaea..e3043184a44f35cd2676375466fff57ec9c91014 100644 (file)
@@ -30,7 +30,7 @@ entity makeXonoticSliderCheckBox(float theOffValue, float isInverted, entity the
        me.configureXonoticSliderCheckBox(me, theOffValue, isInverted, theControlledSlider, theText);
        return me;
 }
-void configureXonoticSliderCheckBoxXonoticSliderCheckBox(entity me, float theOffValue, float isInverted, entity theControlledSlider, string theText)
+void XonoticSliderCheckBox_configureXonoticSliderCheckBox(entity me, float theOffValue, float isInverted, entity theControlledSlider, string theText)
 {
        me.offValue = theOffValue;
        me.inverted = isInverted;
@@ -38,19 +38,20 @@ void configureXonoticSliderCheckBoxXonoticSliderCheckBox(entity me, float theOff
        if(theControlledSlider.value == median(theControlledSlider.valueMin, theControlledSlider.value, theControlledSlider.valueMax))
                me.savedValue = theControlledSlider.value;
        else
-               me.savedValue = theControlledSlider.valueMin; 
+               me.savedValue = theControlledSlider.valueMin;
        me.controlledSlider = theControlledSlider;
        me.configureCheckBox(me, theText, me.fontSize, me.image);
        me.tooltip = theControlledSlider.tooltip;
+       me.cvarName = theControlledSlider.cvarName; // in case we want to display the cvar in the tooltip
 }
-void drawXonoticSliderCheckBox(entity me)
+void XonoticSliderCheckBox_draw(entity me)
 {
        me.checked = ((me.controlledSlider.value == me.offValue) != me.inverted);
        if(me.controlledSlider.value == median(me.controlledSlider.valueMin, me.controlledSlider.value, me.controlledSlider.valueMax))
                me.savedValue = me.controlledSlider.value;
-       drawCheckBox(me);
+       SUPER(XonoticSliderCheckBox).draw(me);
 }
-void setCheckedXonoticSliderCheckBox(entity me, float val)
+void XonoticSliderCheckBox_setChecked(entity me, float val)
 {
        if(me.checked == val)
                return;