From 0e0aa82ab2ebc9f15519cea710a52c5895690152 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 11 Nov 2021 18:27:36 +0800 Subject: * rename Editor.GUI to Editor.Window --- .../Scripting/EditorGUI/ContainerWindow.bind.cpp | 64 ---------------------- 1 file changed, 64 deletions(-) delete mode 100644 Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp (limited to 'Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp') diff --git a/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp b/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp deleted file mode 100644 index 6c73116..0000000 --- a/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "Editor/GUI/EditorWindows.h" -#include "Runtime/Math/Math.h" - -using namespace LuaBind; - -LUA_BIND_REGISTRY(ContainerWindow) -{ - LUA_BIND_REGISTER_METHODS(state, - { "New", _New }, - { "SetTitle", _SetTitle }, - { "SetIcon", _SetIcon }, - { "DoPaint", _DoPaint } - ); -} - -LUA_BIND_POSTPROCESS(ContainerWindow) -{ -} - -LUA_BIND_IMPL_METHOD(ContainerWindow, _SetTitle) -{ - LUA_BIND_PREPARE(L, ContainerWindow); - - cc8* title = state.GetValue(2, ""); - self->SetTitle(title); - - return 0; -} - -LUA_BIND_IMPL_METHOD(ContainerWindow, _SetIcon) -{ - LUA_BIND_PREPARE(L, ContainerWindow); - - cc8* path = state.GetValue(2, ""); - self->SetIcon(path); - - return 0; -} - -LUA_BIND_IMPL_METHOD(ContainerWindow, _DoPaint) -{ - LUA_BIND_PREPARE(L, ContainerWindow); - self->DoPaint(); - return 0; -} - -LUA_BIND_IMPL_METHOD(ContainerWindow, ContainerWindow::_New) -{ - LUA_BIND_STATE(L, ContainerWindow); - LUA_BIND_CHECK(L, "TNTT"); - - ContainerWindow* wnd = new ContainerWindow(state.GetVM()); - - Rect rect = state.GetValue(state, Rect()); - int showMode = state.GetValue(2, 0); - Vector2 min = state.GetValue(state, Vector2()); - Vector2 max = state.GetValue(state, Vector2()); - - wnd->Init(rect, showMode, min, max); - - wnd->PushUserdata(state); - - return 1; -} -- cgit v1.1-26-g67d0