From 22e576b5aa065f3cb2ca67a951af5e68063419a2 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 18 Oct 2021 02:12:30 +0800 Subject: *scripting --- Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp | 8 ++++++++ Editor/Scripting/EditorGUI/EditorGUI.bind.cpp | 11 ++++------- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'Editor/Scripting/EditorGUI') 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(); - state.PopNamespace();// EditorGUI - state.PopNamespace();// GameLab - state.PopNamespace();// Editor - state.PopNamespace();// Global - + return 1; } \ No newline at end of file -- cgit v1.1-26-g67d0