Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
commandbutton.qc
Go to the documentation of this file.
1#include "commandbutton.qh"
2#include "dialog.qh"
3
4entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip)
5{
7 me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip);
8 return me;
9}
10entity 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 localcmd("\n", me.onClickCommand, "\n");
20 //if(me.flags & COMMANDBUTTON_REVERT)
21 // loadAllCvars(me.parent);
22 if(me.flags & COMMANDBUTTON_CLOSE)
23 me.parent.close(me.parent);
24}
25
26void 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}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, int theFlags, string theTooltip)
entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags)
entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip)
void XonoticCommandButton_Click(entity me, entity other)
#define COMMANDBUTTON_CLOSE
entity other
void localcmd(string command,...)
string string_null
Definition nil.qh:9
#define NEW(cname,...)
Definition oo.qh:117
vector
Definition self.qh:92