summaryrefslogtreecommitdiff
path: root/Editor/GUI
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-10-22 23:59:54 +0800
committerchai <chaifix@163.com>2021-10-22 23:59:54 +0800
commit4dafefe46a72ba47468b13d011f8299055081b0f (patch)
tree2a85835ec4d74fecf3815397b384cefe39d31f56 /Editor/GUI
parent1f18d2afec632aa9361079ca3bcb5a7f2d73db3a (diff)
*LuaBind
Diffstat (limited to 'Editor/GUI')
-rw-r--r--Editor/GUI/ContainerWindow.cpp3
-rw-r--r--Editor/GUI/EditorWindows.h4
-rw-r--r--Editor/GUI/GUIWindow.cpp7
3 files changed, 11 insertions, 3 deletions
diff --git a/Editor/GUI/ContainerWindow.cpp b/Editor/GUI/ContainerWindow.cpp
index ee42635..2aca239 100644
--- a/Editor/GUI/ContainerWindow.cpp
+++ b/Editor/GUI/ContainerWindow.cpp
@@ -177,7 +177,8 @@ LRESULT CALLBACK ContainerWindow::ContainerWndProc(HWND hWnd, UINT message, WPAR
return flag;
}
-ContainerWindow::ContainerWindow()
+ContainerWindow::ContainerWindow(LuaBind::VM* vm)
+ : LuaBind::NativeClass<ContainerWindow>(vm)
{
}
diff --git a/Editor/GUI/EditorWindows.h b/Editor/GUI/EditorWindows.h
index 58a37fb..d9805a0 100644
--- a/Editor/GUI/EditorWindows.h
+++ b/Editor/GUI/EditorWindows.h
@@ -53,7 +53,7 @@ public:
kShowAuxWindow = 5, // Popup windows like the color picker, gradient editor, etc. Drawn with black background on Mac
};
- ContainerWindow();
+ ContainerWindow(LuaBind::VM* vm);
~ContainerWindow();
void Init(Rectf size, int showMode, const Vector2f& minSize, const Vector2f& maxSize, std::string name = "");
@@ -134,6 +134,8 @@ public:
static LRESULT CALLBACK GUIViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
static void RepaintAll();
+ GUIWindow(LuaBind::VM* vm);
+
void Init(std::string name = "");
void DoPaint();
void SetContainerWindow(ContainerWindow* wnd);
diff --git a/Editor/GUI/GUIWindow.cpp b/Editor/GUI/GUIWindow.cpp
index 0502b21..8918ad3 100644
--- a/Editor/GUI/GUIWindow.cpp
+++ b/Editor/GUI/GUIWindow.cpp
@@ -174,6 +174,12 @@ void GUIWindow::RepaintAll()
////////////////////////////////////////////////////////////
+GUIWindow::GUIWindow(LuaBind::VM* vm)
+ : LuaBind::NativeClass<GUIWindow>(vm)
+ , m_Instance(vm, Ref::STRONG_REF)
+{
+}
+
void GUIWindow::ProcessEventMessages(UINT message, WPARAM wParam, LPARAM lParam)
{
@@ -226,7 +232,6 @@ void GUIWindow::Init(std::string name)
log_error("Failed to setup rendering context");
log_info("Created GUIWindow " /*+ (long)this*/);
-
}
bool GUIWindow::SetRenderContext()