Xonotic
commandbutton.qc
Go to the documentation of this file.
1 #include "commandbutton.qh"
2 
3 entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip)
4 {
5  entity me;
7  me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip);
8  return me;
9 }
10 entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags)
11 {
12  return makeXonoticCommandButton_T(theText, theColor, theCommand, theFlags, string_null);
13 }
14 
16 {
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)
24 }
25 
26 void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, int theFlags, string theTooltip)
27 {
28  me.configureXonoticButton(me, theText, theColor, theTooltip);
29  me.onClickCommand = theCommand;
30  me.flags = theFlags;
31  me.onClick = XonoticCommandButton_Click;
32  me.onClickEntity = me;
33 }
string string_null
Definition: nil.qh:9
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
entity other
Definition: csprogsdefs.qc:14
#define COMMANDBUTTON_CLOSE
void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, int theFlags, string theTooltip)
entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip)
Definition: commandbutton.qc:3
void XonoticCommandButton_Click(entity me, entity other)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags)