]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/checkbox.qc
Don't show any tooltip with the name of the selected cvar in the cvar list as it...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / checkbox.qc
index 949b01c41da50c353beb177a70991d4683f28741..1065c5d6d1a5ff9b2900f7a82182fb7efe1720ce 100644 (file)
@@ -47,7 +47,7 @@ void XonoticCheckBox_configureXonoticCheckBox(entity me, float theYesValue, floa
        me.yesValue = theYesValue;
        me.noValue = theNoValue;
        me.checked = 0;
-       me.cvarName = (theCvar) ? theCvar : string_null;
+       me.controlledCvar = (theCvar) ? theCvar : string_null;
        me.loadCvars(me);
        setZonedTooltip(me, theTooltip, theCvar);
        me.configureCheckBox(me, theText, me.fontSize, me.image);
@@ -66,22 +66,22 @@ void XonoticCheckBox_loadCvars(entity me)
 {
        float m, d;
 
-       if (!me.cvarName)
+       if (!me.controlledCvar)
                return;
 
        m = (me.yesValue + me.noValue) * 0.5;
-       d = (cvar(me.cvarName) - m) / (me.yesValue - m);
+       d = (cvar(me.controlledCvar) - m) / (me.yesValue - m);
        me.checked = (d > 0);
 }
 void XonoticCheckBox_saveCvars(entity me)
 {
-       if (!me.cvarName)
+       if (!me.controlledCvar)
                return;
 
        if(me.checked)
-               cvar_set(me.cvarName, ftos_mindecimals(me.yesValue));
+               cvar_set(me.controlledCvar, ftos_mindecimals(me.yesValue));
        else
-               cvar_set(me.cvarName, ftos_mindecimals(me.noValue));
+               cvar_set(me.controlledCvar, ftos_mindecimals(me.noValue));
 
-       CheckSendCvars(me, me.cvarName);
+       CheckSendCvars(me, me.controlledCvar);
 }