diff options
Diffstat (limited to 'Editor/Scripting')
-rw-r--r-- | Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp | 8 | ||||
-rw-r--r-- | Editor/Scripting/EditorGUI/EditorGUI.bind.cpp | 11 | ||||
-rw-r--r-- | Editor/Scripting/EditorScripting.cpp | 20 |
3 files changed, 25 insertions, 14 deletions
diff --git a/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp b/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp index f51b6b4..265ea2e 100644 --- a/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp +++ b/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp @@ -10,6 +10,14 @@ LUA_BIND_REGISTRY(ContainnerWindow) LUA_BIND_POSTPROCESS(ContainnerWindow) { + LUA_BIND_REGISTER_ENUM(state, "EShowMode", + { "NormalWindow", ShowMode::kShowNormalWindow }, + { "ShowPopupMenu", ShowMode::kShowPopupMenu }, + { "Utility ", ShowMode::kShowUtility }, + { "NoShadow", ShowMode::kShowNoShadow }, + { "MainWindow", ShowMode::kShowMainWindow }, + { "AuxWindow", ShowMode::kShowAuxWindow } + ); } LUA_BIND_IMPL_METHOD(ContainnerWindow, _SetTitle) diff --git a/Editor/Scripting/EditorGUI/EditorGUI.bind.cpp b/Editor/Scripting/EditorGUI/EditorGUI.bind.cpp index be97638..57c45ca 100644 --- a/Editor/Scripting/EditorGUI/EditorGUI.bind.cpp +++ b/Editor/Scripting/EditorGUI/EditorGUI.bind.cpp @@ -1,21 +1,18 @@ #include "Editor/GUI/EditorWindows.h" // GameLab.Editor.GUI -void luaopen_GameLab_Editor_GUI(lua_State* L) +int luaopen_GameLab_Editor_GUI(lua_State* L) { + log_info("Scripting", "luaopen_GameLab_Editor_GUI()"); + LUA_BIND_STATE(L); state.PushGlobalNamespace(); - state.PushNamespace("GameLab"); state.PushNamespace("Editor"); state.PushNamespace("GUI"); state.RegisterFactory<ContainnerWindow>(); - state.PopNamespace();// EditorGUI - state.PopNamespace();// GameLab - state.PopNamespace();// Editor - state.PopNamespace();// Global - + return 1; }
\ No newline at end of file diff --git a/Editor/Scripting/EditorScripting.cpp b/Editor/Scripting/EditorScripting.cpp index 235636a..65fa8c4 100644 --- a/Editor/Scripting/EditorScripting.cpp +++ b/Editor/Scripting/EditorScripting.cpp @@ -1,22 +1,28 @@ #include "EditorScripting.h" -#include "Editor/Utils/Log.h" +#include "Runtime/Debug/Log.h" // GameLab.Editor -extern void luaopen_GameLab_Editor_GUI(lua_State* L); // GameLab.Editor.GUI -extern void luaopen_GameLab_Editor_GUILayout(lua_State* L); // GameLab.Editor.GUILayout -extern void luaopen_GameLab_Editor_IMGUI(lua_State* L); // GameLab.Editor.IMGUI -extern void luaopen_GameLab_Editor_Resource(lua_State* L); // GameLab.Editor.Resource +extern int luaopen_GameLab_Editor_GUI(lua_State* L); // GameLab.Editor.GUI +extern int luaopen_GameLab_Editor_GUILayout(lua_State* L); // GameLab.Editor.GUILayout +extern int luaopen_GameLab_Editor_IMGUI(lua_State* L); // GameLab.Editor.IMGUI +extern int luaopen_GameLab_Editor_Resource(lua_State* L); // GameLab.Editor.Resource // GameLab.Engine +extern int luaopen_GameLab_Engine_Rendering(lua_State* L); // GameLab.Engine.Rendering // GameLab -extern void luaopen_GameLab_Debug(lua_State* L); +extern int luaopen_GameLab_Debug(lua_State* L); + +#define openlib(cfunc) \ + lua_pushcfunction(L, cfunc);\ + lua_call(L, 0, 0); bool SetupGameLabEditorScripting(lua_State* L) { log_info("Scripting", "SetupGameLabEditorScripting()"); - luaopen_GameLab_Editor_GUI(L); + openlib(luaopen_GameLab_Debug); + openlib(luaopen_GameLab_Editor_GUI); return true; } |