me.yesValue = theYesValue;
me.noValue = theNoValue;
me.checked = 0;
- if(theCvar)
- {
- me.cvarName = theCvar;
- me.loadCvars(me);
- }
+ me.cvarName = (theCvar) ? theCvar : string_null;
+ me.loadCvars(me);
setZonedTooltip(me, theTooltip, theCvar);
me.configureCheckBox(me, theText, me.fontSize, me.image);
}
me.yesString = theYesValue;
me.noString = theNoValue;
me.checked = 0;
- if(theCvar)
- {
- me.cvarName = theCvar;
- me.loadCvars(me);
- }
+ me.cvarName = (theCvar) ? theCvar : string_null;
+ me.loadCvars(me);
me.configureCheckBox(me, theText, me.fontSize, me.image);
}
void XonoticCheckBoxString_setChecked(entity me, float foo)
void XonoticColorpickerString_configureXonoticColorpickerString(entity me, string theCvar, string theDefaultCvar)
{
me.configureImage(me, me.image);
- if(theCvar)
- {
- me.cvarName = theCvar;
- me.loadCvars(me);
- }
+ me.cvarName = (theCvar) ? theCvar : string_null;
+ me.loadCvars(me);
}
void XonoticColorpickerString_loadCvars(entity me)
{
if(pCvar == "")
{
- e.cvarName = string_null; // FIXME XonoticTextSlider doesn't clear cvarName in configureXonoticTextSlider as it's not thought to re-configure itself
e.configureXonoticTextSlider(e, string_null, string_null);
l.setText(l, pLabel);
e.disabled = l.disabled = true;
case MAPINFO_TYPE_KEYHUNT: x = "g_keyhunt_teams_override"; break;
case MAPINFO_TYPE_TEAM_DEATHMATCH: x = "g_tdm_teams_override"; break;
}
- if(!x)
- e.cvarName = string_null; // FIXME XonoticTextSlider doesn't clear cvarName in configureXonoticTextSlider as it's not thought to re-configure itself
e.configureXonoticTextSlider(e, x, theTooltip);
e.configureXonoticTextSliderValues(e);
if(!x)
}
void XonoticGametypeButton_configureXonoticGametypeButton(entity me, float theGroup, string theCvar, string theText, string theTooltip)
{
- if(theCvar)
- {
- me.cvarName = theCvar;
- me.loadCvars(me);
- }
+ me.cvarName = (theCvar) ? theCvar : string_null;
+ me.loadCvars(me);
setZonedTooltip(me, theTooltip, theCvar);
me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
me.align = 0.5;
{
me.configureInputBox(me, "", 0, me.fontSize, me.image);
me.editColorCodes = doEditColorCodes;
- if(theCvar)
- {
- me.cvarName = theCvar;
- me.loadCvars(me);
- }
+ me.cvarName = (theCvar) ? theCvar : string_null;
+ me.loadCvars(me);
setZonedTooltip(me, theTooltip, theCvar);
me.cursorPos = strlen(me.text);
}
}
void XonoticRadioButton_configureXonoticRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText, string theTooltip)
{
- if(theCvar)
- {
- me.cvarName = theCvar;
- me.loadCvars(me);
- }
+ me.cvarName = (theCvar) ? theCvar : string_null;
+ me.loadCvars(me);
setZonedTooltip(me, theTooltip, theCvar);
me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
}
me.configureSliderVisuals(me, me.fontSize, me.align, me.valueSpace, me.image);
+ me.cvarName = (theCvar) ? theCvar : string_null;
if(theCvar)
- {
// Prevent flickering of the slider button by initialising the
// slider out of bounds to hide the button before loading the cvar
me.configureSliderValues(me, theValueMin, theValueMin-theValueStep, theValueMax, theValueStep, theValueStep, vp);
- me.cvarName = theCvar;
- me.loadCvars(me);
- }
else
me.configureSliderValues(me, theValueMin, theValueMin, theValueMax, theValueStep, theValueStep, vp);
+ me.loadCvars(me);
setZonedTooltip(me, theTooltip, theCvar);
}
void XonoticSlider_setValue(entity me, float val)
void XonoticTextSlider_configureXonoticTextSlider(entity me, string theCvar, string theTooltip)
{
me.configureSliderVisuals(me, me.fontSize, me.align, me.valueSpace, me.image);
- if(theCvar)
- {
- me.cvarName = theCvar;
- // me.loadCvars(me); // don't load it yet
- }
+ me.cvarName = (theCvar) ? theCvar : string_null;
+ // me.loadCvars(me); // don't load it yet
setZonedTooltip(me, theTooltip, theCvar);
}
void XonoticTextSlider_setValue(entity me, float val)