summaryrefslogtreecommitdiff
path: root/Editor/EditorMain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Editor/EditorMain.cpp')
-rw-r--r--Editor/EditorMain.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/Editor/EditorMain.cpp b/Editor/EditorMain.cpp
index 7686fa5..555867a 100644
--- a/Editor/EditorMain.cpp
+++ b/Editor/EditorMain.cpp
@@ -15,26 +15,12 @@ void ErrorHandle(cc8* msg)
log_error(std::string("[Lua] ") + msg);
}
-void OnRegisterNativeClass(LuaBind::State& state, int cls, std::string clsName, std::string pkgName)
-{
- // ������͵�Ԫ����
- lua_newtable(state);
- int typeIdx = state.GetTop();
- state.Push("native");
- state.SetField(typeIdx, "mode");
- state.Push(clsName);
- state.SetField(typeIdx, "name");
- state.Push(pkgName);
- state.SetField(typeIdx, "package");
- lua_setfield(state, cls, "_type");
-}
-
void InitLuaState(LuaBind::VM& vm)
{
vm.Setup();
vm.OpenLibs();
- LuaBind::onRegisterNativeClass = OnRegisterNativeClass;
+ LuaBind::onRegisterNativeClass = LuaHelper::OnRegisterNativeClass;
if (!SetupGameLabEditorScripting(vm.GetMainThread()))
{