diff options
author | chai <chaifix@163.com> | 2021-10-25 03:22:49 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-25 03:22:49 +0800 |
commit | 0816cd70ca1a213b6ed872bcf3c0bf0912473722 (patch) | |
tree | ede23a398e78106551434ca762362ca04fd1ba8c /Editor/GUI/GUIWindow.cpp | |
parent | 180b715e72ffc292ebbc4695f8a63ce449004d27 (diff) |
*misc
Diffstat (limited to 'Editor/GUI/GUIWindow.cpp')
-rw-r--r-- | Editor/GUI/GUIWindow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Editor/GUI/GUIWindow.cpp b/Editor/GUI/GUIWindow.cpp index df28785..621eb54 100644 --- a/Editor/GUI/GUIWindow.cpp +++ b/Editor/GUI/GUIWindow.cpp @@ -44,8 +44,10 @@ LRESULT CALLBACK GUIWindow::GUIViewWndProc(HWND hWnd, UINT message, WPARAM wPara case WM_PAINT: { log_info("WndProc", "WM_PAINT"); + self->SetAsRenderContext(); self->OnPaint(); + BeginPaint(self->m_Handle, &ps); EndPaint(self->m_Handle, &ps); UpdateWindow(self->m_Handle); @@ -104,6 +106,8 @@ LRESULT CALLBACK GUIWindow::GUIViewWndProc(HWND hWnd, UINT message, WPARAM wPara { SetFocus(hWnd); + self->DoPaint(); + if (/*processInput && !focused*/ true) { //focused = (GetFocus() == hWnd); @@ -323,7 +327,7 @@ void GUIWindow::OnLostFocus() void GUIWindow::OnPaint() { - InvokeLuaCallback(m_Script, "OnPaint"); + InvokeLuaCallback(m_Script, "OnGUI"); } void GUIWindow::SetPosition(Rect position) |