CHANGED: #1471 CInterfaceParser no longer depends on CLuaIHMRyzom.

--HG--
branch : gui-refactoring
This commit is contained in:
dfighter1985 2012-07-09 03:07:19 +02:00
parent d78ed9eac3
commit e11d65bedc
4 changed files with 17 additions and 6 deletions

View file

@ -585,6 +585,19 @@ void CInterfaceManager::destroy ()
_Instance = NULL; _Instance = NULL;
} }
void CInterfaceManager::initLUA()
{
if( _LuaState != NULL )
return;
CInterfaceParser::initLUA();
if( _LuaState == NULL )
return;
CLuaIHMRyzom::RegisterRyzomFunctions( *_LuaState );
}
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
void CInterfaceManager::initLogin() void CInterfaceManager::initLogin()
{ {

View file

@ -146,6 +146,8 @@ public:
void setInGame( bool i ); void setInGame( bool i );
bool isInGame() const { return _InGame; } bool isInGame() const { return _InGame; }
void initLUA();
/// initialize the whole login interface /// initialize the whole login interface
void initLogin(); void initLogin();

View file

@ -34,9 +34,6 @@
#include "nel/gui/lua_ihm.h" #include "nel/gui/lua_ihm.h"
#include "nel/gui/lua_manager.h" #include "nel/gui/lua_manager.h"
#include "lua_ihm_ryzom.h"
#ifdef LUA_NEVRAX_VERSION #ifdef LUA_NEVRAX_VERSION
#include "lua_ide_dll_nevrax/include/lua_ide_dll/ide_interface.h" // external debugger #include "lua_ide_dll_nevrax/include/lua_ide_dll/ide_interface.h" // external debugger
#endif #endif
@ -2856,7 +2853,6 @@ void CInterfaceParser::initLUA()
// register LUA methods // register LUA methods
CLuaIHM::registerAll(*_LuaState); CLuaIHM::registerAll(*_LuaState);
CLuaIHMRyzom::RegisterRyzomFunctions( *_LuaState );
} }
// *************************************************************************** // ***************************************************************************

View file

@ -344,8 +344,8 @@ protected:
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// LUA Interface State. NB: The LUA environnement is not shared between Login/OutGame/InGame // LUA Interface State. NB: The LUA environnement is not shared between Login/OutGame/InGame
NLMISC::CSmartPtr<CLuaState> _LuaState; NLMISC::CSmartPtr<CLuaState> _LuaState;
void initLUA(); virtual void initLUA();
void uninitLUA(); void uninitLUA();
// List of script loaded (for reloadLua command) // List of script loaded (for reloadLua command)
std::set<std::string> _LuaFileScripts; std::set<std::string> _LuaFileScripts;
// Load A .lua. false if parse error. string 'error' contains the eventual error desc (but warning still displayed) // Load A .lua. false if parse error. string 'error' contains the eventual error desc (but warning still displayed)