X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fcolorbutton.qc;h=6675c1aee789ec2b0ab1291e3fce46bd423347f8;hb=8b7d07cc724c130cb61a8b32099b01b26a418149;hp=bcbdfee8db9d3585a4aa4e51567492207cd392bc;hpb=530e06120a7b41f6175b1144fedf6903da8c13b0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/colorbutton.qc b/qcsrc/menu/xonotic/colorbutton.qc index bcbdfee8d..6675c1aee 100644 --- a/qcsrc/menu/xonotic/colorbutton.qc +++ b/qcsrc/menu/xonotic/colorbutton.qc @@ -1,27 +1,9 @@ -#ifdef INTERFACE -CLASS(XonoticColorButton) EXTENDS(RadioButton) - METHOD(XonoticColorButton, configureXonoticColorButton, void(entity, float, float, float)) - METHOD(XonoticColorButton, setChecked, void(entity, float)) - METHOD(XonoticColorButton, draw, void(entity)) - ATTRIB(XonoticColorButton, fontSize, float, 0) - ATTRIB(XonoticColorButton, image, string, SKINGFX_COLORBUTTON) +#include "colorbutton.qh" - ATTRIB(XonoticColorButton, useDownAsChecked, float, 1) - - ATTRIB(XonoticColorButton, cvarPart, float, 0) - ATTRIB(XonoticColorButton, cvarName, string, string_null) - ATTRIB(XonoticColorButton, cvarValueFloat, float, 0) - METHOD(XonoticColorButton, loadCvars, void(entity)) - METHOD(XonoticColorButton, saveCvars, void(entity)) -ENDCLASS(XonoticColorButton) -entity makeXonoticColorButton(float, float, float); -#endif - -#ifdef IMPLEMENTATION entity makeXonoticColorButton(float theGroup, float theColor, float theValue) { entity me; - me = spawnXonoticColorButton(); + me = NEW(XonoticColorButton); me.configureXonoticColorButton(me, theGroup, theColor, theValue); return me; } @@ -97,4 +79,3 @@ void XonoticColorButton_draw(entity me) me.colorD = me.color; SUPER(XonoticColorButton).draw(me); } -#endif