66static void UI_Memory_f (
void)
69 const size_t nodeSize =
sizeof(
uiNode_t);
104#define MAX_CONFUNC_SIZE 512
128 byte* memory = (
byte*) ALIGN_PTR(
ui_global.curadata, align);
132 memset(memory, 0,
size);
142 typedef std::vector<std::string> Names;
145 names.push_back(std::string(
ui_global.windowStack[
i]->name));
183 for (Names::iterator
i = names.begin();
i != names.end(); ++
i) {
215 for (
int nodeType = 0; nodeType < 2; ++nodeType) {
233 if (node->
next !=
nullptr) {
270 static bool initialized =
false;
280 cvar_t* ui_hunkSize =
Cvar_Get(
"ui_hunksize",
"3", 0,
"UI memory hunk size in megabytes");
283 ui_debug =
Cvar_Get(
"debug_ui",
"0",
CVAR_DEVELOPER,
"Prints node names for debugging purposes - valid values are 1 and 2");
292 Cmd_AddCommand(
"debug_uimemory", UI_Memory_f,
"Display info about UI memory allocation");
void R_FontShutdown(void)
frees the SDL_ttf fonts
bool Cmd_Exists(const char *cmdName)
Checks whether a function exists already.
void Cmd_RemoveCommand(const char *cmdName)
Removes a command from script interface.
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
void Cmd_vExecuteString(const char *fmt, va_list ap)
void Com_Printf(const char *const fmt,...)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
char * FS_NextScriptHeader(const char *files, const char **name, const char **text)
int FS_BuildFileList(const char *fileList)
Build a filelist.
uint32_t _Mem_PoolSize(memPool_t *pool)
#define Mem_FreePool(pool)
#define Mem_PoolAllocTypeN(type, n, pool)
#define Mem_CreatePool(name)
QGL_EXTERN GLint GLenum type
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Atomic element to store UI scripts The parser use this atom to translate script action into many tree...
node behaviour, how a node work
Global data shared into all UI code.
Model that have more than one part (top and down part of an aircraft).
Atomic structure used to define most of the UI.
uiBehaviour_t * behaviour
void UI_InitActions(void)
void UI_InitData(void)
Initialize console command about UI shared data.
void UI_FontShutdown(void)
bool UI_ParseFont(const char *name, const char **text)
void UI_InitFonts(void)
after a video restart we have to reinitialize the fonts
Internal data use by the UI package.
#define UI_MAX_WINDOWSTACK
void UI_FinishWindowsInit(void)
Finish windows initialization.
bool UI_ParseAndLoadLuaScript(const char *name, const char **text)
Parses and loads a .ufo file holding a lua script.
void UI_ShutdownLua(void)
Performs UI specific lua shutdown. Call this before CL_ShutdownLua.
void UI_InitLua(void)
Performs UI specific initialization. Call this after CL_InitLua.
Basic lua initialization for the ui.
void * UI_AllocHunkMemory(size_t size, int align, bool reset)
void UI_ExecuteConfunc(const char *fmt,...)
Executes confunc - just to identify those confuncs in the code - in this frame.
void UI_Shutdown(void)
Reset and free the UI data hunk.
int UI_DebugMode(void)
Get the current debug mode (0 mean disabled).
static void UI_Restart_f(void)
Reloads the ui scripts and reinitializes the ui.
void UI_FinishInit(void)
Finish initialization after everything was loaded.
memPool_t * ui_dynStringPool
int UI_GetNodeBehaviourCount(void)
uiBehaviour_t * UI_GetNodeBehaviour(const char *name)
Return a node behaviour by name.
uiBehaviour_t * UI_GetNodeBehaviourByIndex(int index)
bool UI_ParseWindow(const char *type, const char *name, const char **text)
Parse a window.
bool UI_ParseSprite(const char *name, const char **text)
bool UI_ParseUIModel(const char *name, const char **text)
parses the models.ufo and all files where UI models (menu_model) are defined
bool UI_ParseComponent(const char *type, const char *name, const char **text)
Parse a component.
void UI_ResetTimers(void)
void UI_InitWindows(void)
uiNode_t * UI_PushWindow(const char *name, const char *parentName, linkedList_t *params)
Push a window onto the window stack.