UFO: Alien Invasion
|
#include "../../common/scripts_lua.h"
Go to the source code of this file.
Functions | |
void | CL_InitLua (void) |
Initializes the ui-lua interfacing environment. More... | |
void | CL_ShutdownLua (void) |
Shutdown the ui-lua interfacing environment. More... | |
lua_State * | CL_GetLuaState (void) |
Returns the lua state for the client side. More... | |
void | CL_RegisterCallback (const char *key, LUA_FUNCTION fnc) |
Registers a lua callback function with a key. More... | |
void | CL_ExecuteCallback (lua_State *L, const char *key) |
Calls the registered lua onload callback function. More... | |
void CL_ExecuteCallback | ( | lua_State * | L, |
const char * | key | ||
) |
Calls the registered lua onload callback function.
[in] | L | The lua state for calling lua. |
[in] | key | script The name of the .ufo file holding the lua script. |
Definition at line 190 of file cl_lua.cpp.
References cl_luastate, Com_Printf(), and HASH_Get().
Referenced by UI_CallHandler_OnLoad().
lua_State* CL_GetLuaState | ( | void | ) |
Returns the lua state for the client side.
Definition at line 162 of file cl_lua.cpp.
References cl_luastate.
Referenced by UI_ExecuteLuaConFunc(), UI_ExecuteLuaEventScript(), UI_ExecuteLuaEventScript_DragDrop(), UI_ExecuteLuaEventScript_DragDrop_IsDropped(), UI_ExecuteLuaEventScript_DragDrop_XY(), UI_ExecuteLuaEventScript_DxDy(), UI_ExecuteLuaEventScript_Key(), UI_ExecuteLuaEventScript_ParamList(), UI_ExecuteLuaEventScript_ReturnBool(), UI_ExecuteLuaEventScript_XY(), UI_ExecuteLuaMethod(), and UI_ParseAndLoadLuaScript().
Initializes the ui-lua interfacing environment.
Definition at line 126 of file cl_lua.cpp.
References CL_InsertModuleLoader(), cl_luastate, CL_ShutdownLua(), HASH_NewTable(), and luaopen_ufo().
Referenced by CL_Init(), UILevel2Test::SetUpTestCase(), ParticleTest::SetUpTestCase(), ScriptTest::SetUpTestCase(), FootStepTest::SetUpTestCase(), MapDefStatsTest::SetUpTestCase(), MapDefTest::SetUpTestCase(), MapDefMassRMATest::SetUpTestCase(), and CampaignTest::SetUpTestCase().
void CL_RegisterCallback | ( | const char * | key, |
LUA_FUNCTION | fnc | ||
) |
Registers a lua callback function with a key.
key | A key for finding the callback function by name, usually the script name. |
fnc | A lua function registered in the lua registry index. |
Definition at line 171 of file cl_lua.cpp.
References Com_Printf(), HASH_Insert(), int(), and len.
Referenced by UI_RegisterHandler_OnLoad().
Shutdown the ui-lua interfacing environment.
Definition at line 151 of file cl_lua.cpp.
References cl_luastate, and HASH_DeleteTable().
Referenced by CL_InitLua(), CL_Shutdown(), and TEST_Shutdown().