123 ui_global.sharedData[dataId].data.text = text;
124 ui_global.sharedData[dataId].versionId++;
135 ui_global.sharedData[dataId].versionId++;
140 ui_global.sharedData[dataId].data.linkedListText = text;
141 ui_global.sharedData[dataId].versionId++;
161 return ui_global.sharedData[textId].versionId;
176 assert(tree !=
nullptr);
182 if (last !=
nullptr) {
217 switch (
ui_global.sharedData[dataId].type) {
231 ui_global.sharedData[dataId].data.text =
nullptr;
232 ui_global.sharedData[dataId].versionId++;
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;
315 ui_global.sharedData[dataId].versionId++;
320 ui_global.sharedData[dataId].data.option = option;
321 ui_global.sharedData[dataId].versionId++;
327 return ui_global.sharedData[dataId].data.option;
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 * CL_Translate(const char *t)
Share stuff between the different cgame implementations.
const char * Cmd_Argv(int arg)
Returns a given argument.
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
void Com_Printf(const char *const fmt,...)
memPool_t * com_genericPool
void LIST_Delete(linkedList_t **list)
void * LIST_GetByIdx(linkedList_t *list, int index)
Get an entry of a linked list by its index in the list.
const linkedList_t * LIST_ContainsString(const linkedList_t *list, const char *string)
Searches for the first occurrence of a given string.
bool _Mem_AllocatedInPool(memPool_t *pool, const void *pointer)
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Atomic structure used to define most of the UI.
uiBehaviour_t * behaviour
uiNode_t * depthCache[MAX_DEPTH_OPTIONITERATORCACHE]
static void UI_DeleteOption(uiNode_t *tree)
uiNode_t * UI_InitOptionIteratorAtIndex(int index, uiNode_t *option, uiOptionIterator_t *iterator)
Init an option iterator at an index.
void UI_RegisterOption(int dataId, uiNode_t *option)
void UI_InitData(void)
Initialize console command about UI shared data.
void UI_UpdateInvisOptions(uiNode_t *option, const linkedList_t *stringList)
Unhide those options that are stored in the linked list and hide the others.
static uiNode_t * UI_FindOptionAtIndex(int index, uiNode_t *option, uiOptionIterator_t *iterator)
find an option why index (0 is the first option)
void UI_ResetData(int dataId)
Reset a shared data. Type became NONE and value became nullptr.
int UI_GetDataIDByName(const char *name)
Return a dataId by name.
uiNode_t * UI_GetOption(int dataId)
void UI_SortOptions(uiNode_t **first)
Sort options by alphabet.
static uiNode_t * UI_OptionNodeRemoveHigherOption(uiNode_t **option)
Remove the higher element (in alphabet) from a list.
int UI_FindOptionPosition(uiOptionIterator_t *iterator, const uiNode_t *option)
Find an option position from an option iterator.
static void UI_ResetData_f(void)
Resets the ui_global.sharedData pointers from a func node.
void UI_RegisterText(int dataId, const char *text)
share a text with a data id
void UI_RegisterLinkedListText(int dataId, linkedList_t *text)
share a linked list of text with a data id
const char * UI_GetText(int textId)
static const char *const ui_sharedDataIDNames[]
uiNode_t * UI_OptionIteratorNextOption(uiOptionIterator_t *iterator)
Find the next element from the iterator Iterator skipCollapsed and skipInvisible attribute can contro...
const char * UI_GetTextFromList(int textId, int line)
int UI_GetDataVersion(int textId)
uiNode_t * UI_AddOption(uiNode_t **tree, const char *name, const char *label, const char *value)
Append an option to an option list.
uiNode_t * UI_FindOptionByValue(uiOptionIterator_t *iterator, const char *value)
Find an option (and all his parents) by is value.
@ UI_SHARED_LINKEDLISTTEXT
#define MAX_DEPTH_OPTIONITERATORCACHE
@ TEXT_UFORECOVERY_NATIONS
@ TEXT_UFOPEDIA_MAILHEADER
@ TEXT_UFOPEDIA_REQUIREMENT
@ TEXT_MISSIONBRIEFING_VICTORY_CONDITIONS
@ OPTION_VIDEO_RESOLUTIONS
@ TEXT_MISSIONBRIEFING_TITLE
@ TEXT_MOUSECURSOR_BOTTOM
@ TEXT_UFORECOVERY_CAPACITIES
@ OPTION_SINGLEPLAYER_SKINS
@ TEXT_MOUSECURSOR_PLAYERNAMES
@ OPTION_MULTIPLAYER_SKINS
@ TEXT_MULTIPLAYER_USERTEAM
@ TEXT_UFORECOVERY_UFOYARDS
@ TEXT_MULTIPLAYER_USERLIST
@ OPTION_PRODUCTION_REQUIREMENTS
Internal data use by the UI package.
const uiBehaviour_t * ui_optionBehaviour
uiNode_t * UI_AllocOptionNode(const char *name, const char *label, const char *value)
Initializes an option with a very little set of values.
#define OPTIONEXTRADATA(node)
void UI_DeleteNode(uiNode_t *node)