1 #include "commandbutton.qh"
3 entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, float theFlags, string theTooltip)
6 me = NEW(XonoticCommandButton);
7 me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip);
10 entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float theFlags)
12 return makeXonoticCommandButton_T(theText, theColor, theCommand, theFlags, string_null);
15 void XonoticCommandButton_Click(entity me, entity other)
17 //if(me.flags & COMMANDBUTTON_APPLY)
18 // saveAllCvars(me.parent);
19 cmd("\n", me.onClickCommand, "\n");
20 //if(me.flags & COMMANDBUTTON_REVERT)
21 // loadAllCvars(me.parent);
22 if(me.flags & COMMANDBUTTON_CLOSE)
26 void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags, string theTooltip)
28 me.configureXonoticButton(me, theText, theColor, theTooltip);
29 me.onClickCommand = theCommand;
31 me.onClick = XonoticCommandButton_Click;
32 me.onClickEntity = me;