diff options
author | chai <chaifix@163.com> | 2021-10-24 13:24:13 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-24 13:24:13 +0800 |
commit | 3239ba18797b1aa098056aa0c2a70e250a27a06c (patch) | |
tree | cb42710213cd188dd5f7c7841693c9ebe1b1915a /Editor/Scripting/EditorGUI/GUIWindow.bind.cpp | |
parent | 7bf672fd0c6211909d94078b448032b1bd0916ef (diff) |
* port shader
Diffstat (limited to 'Editor/Scripting/EditorGUI/GUIWindow.bind.cpp')
-rw-r--r-- | Editor/Scripting/EditorGUI/GUIWindow.bind.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp b/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp index 9ecc209..e991398 100644 --- a/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp +++ b/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp @@ -16,6 +16,15 @@ LUA_BIND_POSTPROCESS(GUIWindow) { } +LUA_BIND_IMPL_METHOD(GUIWindow, _New) +{ + LUA_BIND_STATE(L, GUIWindow); + GUIWindow* wnd = new GUIWindow(state.GetVM()); + wnd->Init(); + wnd->PushUserdata(state); + return 1; +} + LUA_BIND_IMPL_METHOD(GUIWindow, _DoPaint) { LUA_BIND_PREPARE(L, GUIWindow); @@ -53,7 +62,7 @@ LUA_BIND_IMPL_METHOD(GUIWindow, _SetPosition) if (!state.CheckParams(1, "UT")) return 0; - Rectf rect; + Rect rect; rect.x = state.GetField<float>(2, 1, 0); rect.y = state.GetField<float>(2, 2, 0); rect.width = state.GetField<float>(2, 3, 0); @@ -61,12 +70,3 @@ LUA_BIND_IMPL_METHOD(GUIWindow, _SetPosition) self->SetPosition(rect); return 0; } - -LUA_BIND_IMPL_METHOD(GUIWindow, _New) -{ - LUA_BIND_PREPARE(L, GUIWindow); - GUIWindow* wnd = new GUIWindow(state.GetVM()); - wnd->Init(); - wnd->PushUserdata(state); - return 1; -}
\ No newline at end of file |