Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
commandbutton.qc File Reference
#include "commandbutton.qh"
#include "dialog.qh"
Include dependency graph for commandbutton.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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)
void XonoticCommandButton_configureXonoticCommandButton (entity me, string theText, vector theColor, string theCommand, int theFlags, string theTooltip)

Function Documentation

◆ makeXonoticCommandButton()

◆ makeXonoticCommandButton_T()

entity makeXonoticCommandButton_T ( string theText,
vector theColor,
string theCommand,
int theFlags,
string theTooltip )

Definition at line 4 of file commandbutton.qc.

5{
6 entity me;
8 me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip);
9 return me;
10}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define NEW(cname,...)
Definition oo.qh:117

References entity(), NEW, and vector.

Referenced by makeXonoticCommandButton().

◆ XonoticCommandButton_Click()

void XonoticCommandButton_Click ( entity me,
entity other )

Definition at line 16 of file commandbutton.qc.

17{
18 //if(me.flags & COMMANDBUTTON_APPLY)
19 // saveAllCvars(me.parent);
20 localcmd("\n", me.onClickCommand, "\n");
21 //if(me.flags & COMMANDBUTTON_REVERT)
22 // loadAllCvars(me.parent);
23 if(me.flags & COMMANDBUTTON_CLOSE)
24 me.parent.close(me.parent);
25}
#define COMMANDBUTTON_CLOSE
void localcmd(string command,...)

References COMMANDBUTTON_CLOSE, entity(), localcmd(), and other.

Referenced by XonoticCommandButton_configureXonoticCommandButton(), and XonoticWelcomeDialog_keyDown().

◆ XonoticCommandButton_configureXonoticCommandButton()

void XonoticCommandButton_configureXonoticCommandButton ( entity me,
string theText,
vector theColor,
string theCommand,
int theFlags,
string theTooltip )

Definition at line 27 of file commandbutton.qc.

28{
29 me.configureXonoticButton(me, theText, theColor, theTooltip);
30 me.onClickCommand = theCommand;
31 me.flags = theFlags;
32 me.onClick = XonoticCommandButton_Click;
33 me.onClickEntity = me;
34}
void XonoticCommandButton_Click(entity me, entity other)

References entity(), vector, and XonoticCommandButton_Click().