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) {
27 void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags, string theTooltip)
29 me.configureXonoticButton(me, theText, theColor, theTooltip);
30 me.onClickCommand = theCommand;
32 me.onClick = XonoticCommandButton_Click;
33 me.onClickEntity = me;