32 #define POPUPBUTTON_WINDOW_NAME "popup_button"
33 #define POPUPBUTTON_NODE_NAME "popup_button_"
34 #define POPUP_WINDOW_NAME "popup"
47 void UI_Popup (
const char* title,
const char* text)
49 Cvar_Set(
"ui_sys_popup_title",
"%s", title);
67 Cvar_Set(
"ui_sys_popup_title",
"%s", title);
125 buttonNode->
invis =
false;
128 buttonNode->
invis =
true;
148 const char* clickAction1,
const char* clickText1,
const char* tooltip1,
149 const char* clickAction2,
const char* clickText2,
const char* tooltip2,
150 const char* clickAction3,
const char* clickText3,
const char* tooltip3)
154 Cvar_Set(
"ui_sys_popup_title",
"%s", title);
164 Cvar_Set(
"ui_sys_popup_button_text1",
"%s", clickText1);
165 Cvar_Set(
"ui_sys_popup_button_tooltip1",
"%s", tooltip1);
166 if (!clickAction1 && !clickText1) {
174 Cvar_Set(
"ui_sys_popup_button_text2",
"%s", clickText2);
175 Cvar_Set(
"ui_sys_popup_button_tooltip2",
"%s", tooltip2);
176 if (!clickAction2 && !clickText2) {
183 Cvar_Set(
"ui_sys_popup_button_text3",
"%s", clickText3);
184 Cvar_Set(
"ui_sys_popup_button_tooltip3",
"%s", tooltip3);
185 if (!clickAction3 && !clickText3) {
struct uiAction_s::@14::@16 terminal
Stores a terminal action (a value, which must be a leaf in the tree)
void UI_PoolAllocAction(uiAction_t **action, int type, const void *data)
Set a new action to a uiAction_t pointer.
void UI_RegisterLinkedListText(int dataId, linkedList_t *text)
share a linked list of text with a data id
void UI_RegisterText(int dataId, const char *text)
share a text with a data id
const char * va(const char *format,...)
does a varargs printf into a temp buffer, so I don't need to have varargs versions of all text functi...
union uiAction_s::@14 d
Stores data about the action.
struct uiAction_s * onClick
C interface to allow to access to cpp node code.
void Com_Error(int code, const char *fmt,...)
uiNode_t * UI_PushWindow(const char *name, const char *parentName, linkedList_t *params)
Push a window onto the window stack.
void UI_ResetData(int dataId)
Reset a shared data. Type became NONE and value became nullptr.
bool UI_IsWindowOnStack(const char *name)
Check if a named window is on the stack if active windows.
Atomic structure used to define most of the UI.
uiNode_t * UI_GetWindow(const char *name)
Searches all windows for the specified one.
uiNode_t * UI_GetNode(const uiNode_t *node, const char *name)
Search a child node by given name.
cvar_t * Cvar_Set(const char *varName, const char *value,...)
Sets a cvar value.