scripting suggestions
Posted: Thu Mar 10, 2005 23:08
hi CE.
I've abandoned AngelScript and have been looking at LuaPlus lately. I have got a ScriptModule up and running and everything is working fine, but there's a few things.
in the CEGUI::System constructor there is a feature for a initscript. but I'm not able to use that feature since I can't register the luaplus bindings before after the new CEGUI::System call.
fx.
so the initscript is executed before the bindings are created. not good.
I suggest to have two virtual functions in CEGUI::ScriptModule. createBindings and destroyBindings
createBindings should be called when the whole gui is initialised but before running the initscript
likewise destroyBindings should be called just before cleanup begins.
and what about a CEGUI::ScriptModule::executeString( const String& str ) method ?
anyways... I'll release something soon. But the source is somewhat messy right now.
it works by wrapper classes for the singletons and an inherited Window class with exportable functions for handling windows.
- tomas
I've abandoned AngelScript and have been looking at LuaPlus lately. I have got a ScriptModule up and running and everything is working fine, but there's a few things.
in the CEGUI::System constructor there is a feature for a initscript. but I'm not able to use that feature since I can't register the luaplus bindings before after the new CEGUI::System call.
fx.
Code: Select all
...
LuaScriptModule* mScriptModule = new LuaScriptModule( lua_state );
system = new System( mRenderer, mScriptModule );
mScriptModule->createBindings();
so the initscript is executed before the bindings are created. not good.
I suggest to have two virtual functions in CEGUI::ScriptModule. createBindings and destroyBindings
createBindings should be called when the whole gui is initialised but before running the initscript
likewise destroyBindings should be called just before cleanup begins.
and what about a CEGUI::ScriptModule::executeString( const String& str ) method ?
anyways... I'll release something soon. But the source is somewhat messy right now.
it works by wrapper classes for the singletons and an inherited Window class with exportable functions for handling windows.
- tomas