me.configureXonoticColorButton(me, theGroup, theColor, theValue);
return me;
}
-void configureXonoticColorButtonXonoticColorButton(entity me, float theGroup, float theColor, float theValue)
+void XonoticColorButton_configureXonoticColorButton(entity me, float theGroup, float theColor, float theValue)
{
me.cvarName = "_cl_color";
me.cvarValueFloat = theValue;
me.srcMulti = 1;
me.src2 = me.image2;
}
-void setCheckedXonoticColorButton(entity me, float val)
+void XonoticColorButton_setChecked(entity me, float val)
{
if(val != me.checked)
{
me.saveCvars(me);
}
}
-void loadCvarsXonoticColorButton(entity me)
+void XonoticColorButton_loadCvars(entity me)
{
if not(me.cvarName)
return;
else
me.checked = (cvar(me.cvarName) & 15) == me.cvarValueFloat;
}
-void saveCvarsXonoticColorButton(entity me)
+void XonoticColorButton_saveCvars(entity me)
{
if not(me.cvarName)
return;
}
// TODO on an apply button, read _cl_color and execute the color command for it
}
-void drawXonoticColorButton(entity me)
+void XonoticColorButton_draw(entity me)
{
me.color2 = colormapPaletteColor(me.cvarValueFloat, me.cvarPart);
SUPER(XonoticColorButton).draw(me);