3 #include "../item/button.qc"
4 CLASS(XonoticButton, Button)
5 METHOD(XonoticButton, configureXonoticButton, void(entity, string, vector));
6 ATTRIB(XonoticButton, fontSize, float, SKINFONTSIZE_NORMAL)
7 ATTRIB(XonoticButton, image, string, SKINGFX_BUTTON)
8 ATTRIB(XonoticButton, grayImage, string, SKINGFX_BUTTON_GRAY)
9 ATTRIB(XonoticButton, color, vector, SKINCOLOR_BUTTON_N)
10 ATTRIB(XonoticButton, colorC, vector, SKINCOLOR_BUTTON_C)
11 ATTRIB(XonoticButton, colorF, vector, SKINCOLOR_BUTTON_F)
12 ATTRIB(XonoticButton, colorD, vector, SKINCOLOR_BUTTON_D)
13 ATTRIB(XonoticButton, alpha, float, SKINALPHA_TEXT)
14 ATTRIB(XonoticButton, disabledAlpha, float, SKINALPHA_DISABLED)
15 ATTRIB(XonoticButton, marginLeft, float, SKINMARGIN_BUTTON) // chars
16 ATTRIB(XonoticButton, marginRight, float, SKINMARGIN_BUTTON) // chars
17 ENDCLASS(XonoticButton)
18 entity makeXonoticButton(string theText, vector theColor);
22 entity makeXonoticButton(string theText, vector theColor)
25 me = NEW(XonoticButton);
26 me.configureXonoticButton(me, theText, theColor);
30 void XonoticButton_configureXonoticButton(entity me, string theText, vector theColor)
32 if(theColor == '0 0 0')
34 me.configureButton(me, theText, me.fontSize, me.image);
38 me.configureButton(me, theText, me.fontSize, me.grayImage);
43 me.tooltip = getZonedTooltipForIdentifier(strcat(currentDialog.classname, "/", me.text));