diff options
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) |