Xonotic
modalcontroller.qh File Reference
#include "container.qh"
+ Include dependency graph for modalcontroller.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ModalController
 

Functions

void DialogCloseButton_Click (entity button, entity tab)
 
void DialogOpenButton_Click (entity button, entity tab)
 
void DialogOpenButton_Click_withCoords (entity button, entity tab, vector theOrigin, vector theSize)
 
void TabButton_Click (entity button, entity tab)
 

Variables

float ModalController_state
 
vector origin
 
vector size
 
entity tabSelectingButton
 

Function Documentation

◆ DialogCloseButton_Click()

void DialogCloseButton_Click ( entity  button,
entity  tab 
)

Definition at line 44 of file modalcontroller.qc.

Referenced by Dialog_close().

45  {
46  tab.parent.hideChild(tab.parent, tab, 0);
47  }
+ Here is the caller graph for this function:

◆ DialogOpenButton_Click()

void DialogOpenButton_Click ( entity  button,
entity  tab 
)

Definition at line 30 of file modalcontroller.qc.

References DialogOpenButton_Click_withCoords().

Referenced by Button_playClickSound(), DemoConfirm_Check_Gamestatus(), HUDSetup_Check_Gamestatus(), KeyBinder_Bind_Edit(), and XonoticLanguageList_setLanguage().

31  {
32  DialogOpenButton_Click_withCoords(button, tab, button.origin, button.size);
33  }
void DialogOpenButton_Click_withCoords(entity button, entity tab, vector theOrigin, vector theSize)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DialogOpenButton_Click_withCoords()

void DialogOpenButton_Click_withCoords ( entity  button,
entity  tab,
vector  theOrigin,
vector  theSize 
)

Definition at line 35 of file modalcontroller.qc.

36  {
37  if (tab.ModalController_state) return;
38  if (button) button.forcePressed = 1;
39  if (tab.parent.focusedChild) tab.parent.focusedChild.saveFocus(tab.parent.focusedChild);
40  tab.ModalController_controllingButton = button;
41  tab.parent.showChild(tab.parent, tab, theOrigin, theSize, 0);
42  }

◆ TabButton_Click()

void TabButton_Click ( entity  button,
entity  tab 
)

Definition at line 21 of file modalcontroller.qc.

Referenced by m_activate_window(), and ModalController_addTab().

22  {
23  if (tab.ModalController_state == 1) return;
24  tab.parent.hideAll(tab.parent, 0);
25  button.forcePressed = 1;
26  tab.ModalController_controllingButton = button;
27  tab.parent.showChild(tab.parent, tab, button.origin, button.size, 0);
28  }
+ Here is the caller graph for this function:

Variable Documentation

◆ ModalController_state

float ModalController_state

Definition at line 43 of file modalcontroller.qh.

◆ origin

vector origin

Definition at line 45 of file modalcontroller.qh.

◆ size

vector size

Definition at line 46 of file modalcontroller.qh.

◆ tabSelectingButton

entity tabSelectingButton

Definition at line 44 of file modalcontroller.qh.