UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_main.cpp File Reference
#include "ui_main.h"
#include "ui_internal.h"
#include "ui_draw.h"
#include "ui_timer.h"
#include "ui_font.h"
#include "ui_parse.h"
#include "ui_sound.h"
#include "../cl_menu.h"
#include "node/ui_node_abstractnode.h"
#include "ui_lua.h"
#include <vector>
#include <string>
Include dependency graph for ui_main.cpp:

Go to the source code of this file.

Macros

#define MAX_CONFUNC_SIZE   512

Functions

int UI_DebugMode (void)
 Get the current debug mode (0 mean disabled).
void UI_ExecuteConfunc (const char *fmt,...)
 Executes confunc - just to identify those confuncs in the code - in this frame.
voidUI_AllocHunkMemory (size_t size, int align, bool reset)
static void UI_Restart_f (void)
 Reloads the ui scripts and reinitializes the ui.
void UI_Reinit (void)
void UI_Shutdown (void)
 Reset and free the UI data hunk.
void UI_FinishInit (void)
 Finish initialization after everything was loaded.
void UI_Init (void)

Variables

uiGlobal_t ui_global
memPool_tui_dynStringPool
memPool_tui_dynPool
memPool_tui_sysPool

Macro Definition Documentation

◆ MAX_CONFUNC_SIZE

#define MAX_CONFUNC_SIZE   512

Definition at line 104 of file ui_main.cpp.

Function Documentation

◆ UI_AllocHunkMemory()

void * UI_AllocHunkMemory ( size_t size,
int align,
bool reset )

Allocate memory from hunk managed by the UI code This memory is allocated one time, and never released.

Parameters
sizeQuantity of memory expected
alignAlignement of the expected memory
resetIf true initilize the memory with 0
Returns
available memory, else nullptr

Definition at line 126 of file ui_main.cpp.

References ui_global.

Referenced by UI_AllocNodeWithoutNew(), UI_AllocStaticColor(), UI_AllocStaticFloat(), UI_AllocStaticString(), UI_InitializeNodeBehaviour(), UI_ParseExcludeRect(), and UI_RegisterNodePropertyPosSize_().

◆ UI_DebugMode()

int UI_DebugMode ( void )

Get the current debug mode (0 mean disabled).

See also
UI_DisplayNotice

Definition at line 52 of file ui_main.cpp.

References cvar_t::integer.

Referenced by UI_Draw(), UI_ExecuteConfunc(), and UI_GetNodeInTreeAtPosition().

◆ UI_ExecuteConfunc()

void UI_ExecuteConfunc ( const char * fmt,
... )

Executes confunc - just to identify those confuncs in the code - in this frame.

Parameters
[in]fmtConstruct string it will execute (command and param)

Definition at line 110 of file ui_main.cpp.

References Cmd_vExecuteString().

Referenced by cgame_import_t::__attribute__(), CL_ActorAddToTeamList(), CL_ActorClientAction(), CL_ActorReactionFireAbortShot(), CL_ActorReactionFireAddTarget(), CL_ActorReactionFireChange(), CL_ActorReactionFireRemoveTarget(), CL_ActorReactionFireTargetUpdate(), CL_ActorRemoveFromTeamList(), CL_ActorResetClientAction(), CL_ActorSelect(), CL_ActorWound(), CL_AddBrushModel(), CL_BattlescapeRadarGenerateAllRelease_f(), CL_BattlescapeRadarGenPreview_f(), CL_DoEndRound(), CL_Reset(), CLMN_AddBindings(), CLMN_AddUIBindings(), CLMN_InitKeyList_f(), GAME_AppendTeamMember(), GAME_GetImportData(), GAME_InitializeBattlescape(), GAME_InitUIData(), GAME_LoadTeamInfo(), GAME_ResetCharacters(), GAME_TeamSlotComments_f(), GAME_UpdateTeamMenuParameters_f(), HUD_ActorSelectionChangeListener(), HUD_ActorWoundData_f(), HUD_DisplayActions(), HUD_DisplayFiremodeEntry(), HUD_DisplayImpossibleReaction(), HUD_DisplayPossibleReaction(), HUD_InitUI(), HUD_SetWeaponButton(), HUD_Update(), HUD_UpdateActorLoad_f(), HUD_UpdateActorStats(), HUD_UpdateButtons(), INV_ItemDescription(), INV_UpdateActorLoad_f(), INV_UpdateObject_f(), Irc_Client_CmdPrivmsg(), TUT_GetTutorials_f(), UI_CvarChangeListener(), UI_ListMaps_f(), UI_MaterialEditorUpdate(), WEB_Auth_f(), WEB_CGameDelete(), WEB_CGameListForUser(), WEB_CGameUpload(), and WEB_ListCGameFilesCallback().

◆ UI_FinishInit()

void UI_FinishInit ( void )

Finish initialization after everything was loaded.

Note
private function

Definition at line 268 of file ui_main.cpp.

References UI_FinishWindowsInit().

Referenced by UI_InitStack().

◆ UI_Init()

◆ UI_Reinit()

void UI_Reinit ( void )

Reinit input and font

Definition at line 191 of file ui_main.cpp.

References UI_InitFonts(), UI_InvalidateMouse(), and UI_ReleaseInput().

Referenced by UI_Restart_f(), and VID_Restart_f().

◆ UI_Restart_f()

◆ UI_Shutdown()

void UI_Shutdown ( void )

Reset and free the UI data hunk.

Note
Even called in case of an error when CL_Shutdown was called - maybe even before CL_InitLocal (and thus UI_Init) was called
See also
CL_Shutdown
UI_Init

Definition at line 205 of file ui_main.cpp.

References uiNode_t::behaviour, Cmd_Exists(), Cmd_RemoveCommand(), uiNode_t::firstChild, i, Mem_Free, Mem_FreePool, uiNode_t::name, uiNode_t::next, OBJZERO, uiNode_t::parent, ui_dynPool, ui_dynStringPool, UI_FontShutdown(), UI_GetNodeBehaviour(), ui_global, UI_ResetInput(), UI_ResetTimers(), UI_ShutdownLua(), and ui_sysPool.

Referenced by CL_Shutdown(), UILevel2Test::TearDownTestCase(), TEST_Shutdown(), and UI_Restart_f().

Variable Documentation

◆ ui_dynPool

◆ ui_dynStringPool

◆ ui_global

uiGlobal_t ui_global

Definition at line 38 of file ui_main.cpp.

Referenced by uiText2Node::draw(), uiTextListNode::draw(), uiTextNode::draw(), uiWindowNode::draw(), UI_AllocHunkMemory(), UI_AllocNodeWithoutNew(), UI_AllocStaticAction(), UI_AllocStaticKeyBinding(), UI_AllocStaticSprite(), UI_CloseAllWindow(), UI_CloseWindowByRef(), UI_CompleteWithWindow(), UI_CreateWindow(), UI_DebugListWindows_f(), UI_DeleteWindowFromStack(), UI_Draw(), UI_ExecuteAction(), UI_FinishWindowsInit(), UI_FocusNextActionNode(), UI_FreeStringProperty(), UI_GetActiveWindow(), UI_GetComponent(), UI_GetDataVersion(), UI_GetKeyBindingByIndex(), UI_GetKeyBindingCount(), UI_GetLastFullScreenWindow(), UI_GetNodeAtPosition(), UI_GetOption(), UI_GetSpriteByName(), UI_GetText(), UI_GetTextFromList(), UI_GetUIModel(), UI_GetVariable(), UI_GetWindow(), UI_GetWindowPositionFromStackByName(), UI_Init(), UI_InitRawActionValue(), UI_InitStack(), UI_InsertComponent(), UI_InsertWindow(), UI_InsertWindowIntoStack(), UI_InvalidateStack(), UI_IsMouseOnWindow(), UI_KeyPressed(), UI_LeftClick(), UI_ListUIModels_f(), UI_MoveWindowOnTop(), UI_ParseNodeBody(), UI_ParseProperty(), UI_ParseUIModel(), UI_ParseWindow(), UI_PopWindow(), UI_PopWindowWithEscKey(), UI_PushWindow(), UI_RegisterLinkedListText(), UI_RegisterOption(), UI_RegisterText(), UI_RemoveWindow(), UI_RemoveWindowAtPositionFromStack(), UI_ResetData(), UI_Restart_f(), UI_SetKeyBindingEx(), UI_Shutdown(), UI_SpriteExists(), UI_TextNodeGenerateLineSplit(), uiText2Node::updateCache(), and uiTextNode::updateCache().

◆ ui_sysPool