UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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>

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) More...
 
void UI_ExecuteConfunc (const char *fmt,...)
 Executes confunc - just to identify those confuncs in the code - in this frame. More...
 
voidUI_AllocHunkMemory (size_t size, int align, bool reset)
 
static void UI_Restart_f (void)
 Reloads the ui scripts and reinitializes the ui. More...
 
void UI_Reinit (void)
 
void UI_Shutdown (void)
 Reset and free the UI data hunk. More...
 
void UI_FinishInit (void)
 Finish initialization after everything was loaded. More...
 
void UI_Init (void)
 

Variables

uiGlobal_t ui_global
 
memPool_tui_dynStringPool
 
memPool_tui_dynPool
 
memPool_tui_sysPool
 

Macro Definition Documentation

#define MAX_CONFUNC_SIZE   512

Definition at line 104 of file ui_main.cpp.

Function Documentation

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 uiGlobal_s::adata, uiGlobal_s::adataize, and uiGlobal_s::curadata.

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

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_s::integer.

Referenced by UI_Draw(), and UI_GetNodeInTreeAtPosition().

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 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_MaterialEditorUpdate(), WEB_Auth_f(), WEB_CGameDelete(), WEB_CGameListForUser(), WEB_CGameUpload(), and WEB_ListCGameFilesCallback().

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().

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().

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 uiGlobal_s::adata, uiNode_t::behaviour, Cmd_Exists(), Cmd_RemoveCommand(), uiGlobal_s::components, uiNode_t::firstChild, i, Mem_Free, Mem_FreePool, uiNode_t::name, uiNode_t::next, uiGlobal_s::numWindows, OBJZERO, uiNode_t::parent, UI_FontShutdown(), UI_GetNodeBehaviour(), UI_ResetInput(), UI_ResetTimers(), UI_ShutdownLua(), and uiGlobal_s::windows.

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

Variable Documentation