4 #include "../item/button.qc"
5 CLASS(XonoticButton, Button)
6 METHOD(XonoticButton, configureXonoticButton, void(entity, string, vector, string));
7 ATTRIB(XonoticButton, fontSize, float, SKINFONTSIZE_NORMAL)
8 ATTRIB(XonoticButton, image, string, SKINGFX_BUTTON)
9 ATTRIB(XonoticButton, grayImage, string, SKINGFX_BUTTON_GRAY)
10 ATTRIB(XonoticButton, color, vector, SKINCOLOR_BUTTON_N)
11 ATTRIB(XonoticButton, colorC, vector, SKINCOLOR_BUTTON_C)
12 ATTRIB(XonoticButton, colorF, vector, SKINCOLOR_BUTTON_F)
13 ATTRIB(XonoticButton, colorD, vector, SKINCOLOR_BUTTON_D)
14 ATTRIB(XonoticButton, alpha, float, SKINALPHA_TEXT)
15 ATTRIB(XonoticButton, disabledAlpha, float, SKINALPHA_DISABLED)
16 ATTRIB(XonoticButton, marginLeft, float, SKINMARGIN_BUTTON) // chars
17 ATTRIB(XonoticButton, marginRight, float, SKINMARGIN_BUTTON) // chars
18 ENDCLASS(XonoticButton)
19 entity makeXonoticButton_T(string theText, vector theColor, string theTooltip);
20 entity makeXonoticButton(string theText, vector theColor);
24 entity makeXonoticButton_T(string theText, vector theColor, string theTooltip)
27 me = NEW(XonoticButton);
28 me.configureXonoticButton(me, theText, theColor, theTooltip);
31 entity makeXonoticButton(string theText, vector theColor)
33 return makeXonoticButton_T(theText, theColor, string_null);
36 void XonoticButton_configureXonoticButton(entity me, string theText, vector theColor, string theTooltip)
38 if(theColor == '0 0 0')
40 me.configureButton(me, theText, me.fontSize, me.image);
44 me.configureButton(me, theText, me.fontSize, me.grayImage);
49 setZonedTooltip(me, theTooltip, string_null);