From 0816cd70ca1a213b6ed872bcf3c0bf0912473722 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Oct 2021 03:22:49 +0800 Subject: *misc --- Editor/GUI/GUIWindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Editor/GUI/GUIWindow.cpp') 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) -- cgit v1.1-26-g67d0