Xonotic
commandbutton.qc File Reference
#include "commandbutton.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()

entity makeXonoticCommandButton ( string  theText,
vector  theColor,
string  theCommand,
int  theFlags 
)

Definition at line 10 of file commandbutton.qc.

References makeXonoticCommandButton_T(), and string_null.

Referenced by XonoticAudioSettingsTab_fill(), XonoticEffectsSettingsTab_fill(), XonoticGameWeaponsSettingsTab_fill(), XonoticProfileTab_fill(), and XonoticVideoSettingsTab_fill().

11 {
12  return makeXonoticCommandButton_T(theText, theColor, theCommand, theFlags, string_null);
13 }
string string_null
Definition: nil.qh:9
entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip)
Definition: commandbutton.qc:3
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ makeXonoticCommandButton_T()

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

Definition at line 3 of file commandbutton.qc.

References entity(), and NEW.

Referenced by makeXonoticCommandButton().

4 {
5  entity me;
7  me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip);
8  return me;
9 }
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XonoticCommandButton_Click()

void XonoticCommandButton_Click ( entity  me,
entity  other 
)

Definition at line 15 of file commandbutton.qc.

References cmd(), COMMANDBUTTON_CLOSE, m_goto(), and string_null.

Referenced by XonoticCommandButton_configureXonoticCommandButton().

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 }
string string_null
Definition: nil.qh:9
#define COMMANDBUTTON_CLOSE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XonoticCommandButton_configureXonoticCommandButton()

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

Definition at line 26 of file commandbutton.qc.

References XonoticCommandButton_Click().

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 }
void XonoticCommandButton_Click(entity me, entity other)
+ Here is the call graph for this function: