25 #include "../cl_shared.h"
26 #include "../cl_language.h"
32 #include "../cl_language.h"
176 assert(tree !=
nullptr);
182 if (last !=
nullptr) {
250 if (strcmp(label, searchlabel) < 0) {
255 search = search->
next;
259 if (prevfind ==
nullptr) {
261 *option = (*option)->
next;
279 if (option ==
nullptr)
287 element->
next = *first;
299 if (option ==
nullptr || stringList ==
nullptr)
304 option->
invis =
false;
306 option->
invis =
true;
307 option = option->
next;
343 option = option->
next;
349 iterator->
option = option;
357 option = option->
next;
370 option = option->
next;
373 iterator->
option =
nullptr;
434 option = iterator->
option;
447 iterator->
option = option;
450 option = option->
next;
458 iterator->
option =
nullptr;
470 while (iterator->
option) {
488 while (iterator->
option) {
489 if (iterator->
option == option)
const char * Cmd_Argv(int arg)
Returns a given argument.
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
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
void UI_SortOptions(uiNode_t **first)
Sort options by alphabet.
void * LIST_GetByIdx(linkedList_t *list, int index)
Get an entry of a linked list by its index in the list.
uiSharedData_t sharedData[UI_MAX_DATAID]
Holds shared data.
uiNode_t * UI_FindOptionByValue(uiOptionIterator_t *iterator, const char *value)
Find an option (and all his parents) by is value.
static uiNode_t * UI_FindOptionAtIndex(int index, uiNode_t *option, uiOptionIterator_t *iterator)
find an option why index (0 is the first option)
static void UI_ResetData_f(void)
Resets the ui_global.sharedData pointers from a func node.
uiBehaviour_t * behaviour
void UI_UpdateInvisOptions(uiNode_t *option, const linkedList_t *stringList)
Unhide those options that are stored in the linked list and hide the others.
#define MAX_DEPTH_OPTIONITERATORCACHE
uiNode_t * option
Holds a linked list for option (label, action, icon...)
void Com_Printf(const char *const fmt,...)
uiNode_t * UI_GetOption(int dataId)
void UI_DeleteNode(uiNode_t *node)
void LIST_Delete(linkedList_t **list)
int UI_GetDataVersion(int textId)
int UI_GetDataIDByName(const char *name)
Return a dataId by name.
static const char *const ui_sharedDataIDNames[]
static void UI_DeleteOption(uiNode_t *tree)
Internal data use by the UI package.
uiNode_t * depthCache[MAX_DEPTH_OPTIONITERATORCACHE]
uiNode_t * UI_OptionIteratorNextOption(uiOptionIterator_t *iterator)
Find the next element from the iterator Iterator skipCollapsed and skipInvisible attribute can contro...
const char * UI_GetText(int textId)
bool _Mem_AllocatedInPool(memPool_t *pool, const void *pointer)
uiNode_t * UI_AllocOptionNode(const char *name, const char *label, const char *value)
Initializes an option with a very little set of values.
void UI_InitData(void)
Initialize console command about UI shared data.
#define OPTIONEXTRADATA(node)
void UI_ResetData(int dataId)
Reset a shared data. Type became NONE and value became nullptr.
linkedList_t * linkedListText
Holds a linked list for displaying in the UI.
const char * UI_GetTextFromList(int textId, int line)
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
memPool_t * com_genericPool
int UI_FindOptionPosition(uiOptionIterator_t *iterator, const uiNode_t *option)
Find an option position from an option iterator.
const linkedList_t * LIST_ContainsString(const linkedList_t *list, const char *string)
Searches for the first occurrence of a given string.
Atomic structure used to define most of the UI.
uiNode_t * UI_InitOptionIteratorAtIndex(int index, uiNode_t *option, uiOptionIterator_t *iterator)
Init an option iterator at an index.
CASSERT(lengthof(ui_sharedDataIDNames)==UI_MAX_DATAID)
union uiSharedData_s::@18 data
const char * CL_Translate(const char *t)
static uiNode_t * UI_OptionNodeRemoveHigherOption(uiNode_t **option)
Remove the higher element (in alphabet) from a list.
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
void UI_RegisterOption(int dataId, uiNode_t *option)
uiNode_t * UI_AddOption(uiNode_t **tree, const char *name, const char *label, const char *value)
Append an option to an option list.
const uiBehaviour_t * ui_optionBehaviour
const char * text
Holds static array of characters to display.