diff options
Diffstat (limited to 'Editor/GUI')
-rw-r--r-- | Editor/GUI/ContainerWindow.cpp | 10 | ||||
-rw-r--r-- | Editor/GUI/ContainerWindow.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Editor/GUI/ContainerWindow.cpp b/Editor/GUI/ContainerWindow.cpp index 99fa6cb..59cd008 100644 --- a/Editor/GUI/ContainerWindow.cpp +++ b/Editor/GUI/ContainerWindow.cpp @@ -431,6 +431,16 @@ void ContainerWindow::Close() SendMessage(m_Window, WM_CLOSE, 0, 0); } +Vector2f ContainerWindow::GetSize() +{ + RECT rect; + GetClientRect(m_Window, &rect); + Vector2f size; + size.x = rect.right - rect.left; + size.y = rect.bottom - rect.top; + return size; +} + void ContainerWindow::OnRectChanged() { diff --git a/Editor/GUI/ContainerWindow.h b/Editor/GUI/ContainerWindow.h index 140748d..08f08fe 100644 --- a/Editor/GUI/ContainerWindow.h +++ b/Editor/GUI/ContainerWindow.h @@ -40,6 +40,8 @@ public: void DoPaint(); void Close(); + Vector2f GetSize(); + GET_SET(std::string, Name, m_Name); GET(HWND, WindowHandle, m_Window); @@ -77,6 +79,7 @@ private: LUA_BIND_DECL_METHOD(_SetTitle); LUA_BIND_DECL_METHOD(_SetIcon); LUA_BIND_DECL_METHOD(_DoPaint); + LUA_BIND_DECL_METHOD(_GetSize); }; |