Update release

This commit is contained in:
vczh
2023-01-19 01:07:59 -08:00
parent 19cbd6156b
commit 773f0bc2d4
7 changed files with 262 additions and 151 deletions
+29 -19
View File
@@ -33509,6 +33509,31 @@ Native Window Provider
{
currentController=controller;
}
/***********************************************************************
Helper Functions
***********************************************************************/
INativeCursor* GetCursorFromHitTest(INativeWindowListener::HitTestResult hitTestResult, INativeResourceService* resourceService)
{
switch (hitTestResult)
{
case INativeWindowListener::BorderLeft:
case INativeWindowListener::BorderRight:
return resourceService->GetSystemCursor(INativeCursor::SizeWE);
case INativeWindowListener::BorderTop:
case INativeWindowListener::BorderBottom:
return resourceService->GetSystemCursor(INativeCursor::SizeNS);
case INativeWindowListener::BorderLeftTop:
case INativeWindowListener::BorderRightBottom:
return resourceService->GetSystemCursor(INativeCursor::SizeNWSE);
case INativeWindowListener::BorderRightTop:
case INativeWindowListener::BorderLeftBottom:
return resourceService->GetSystemCursor(INativeCursor::SizeNESW);
default:
return nullptr;
}
}
}
}
@@ -34138,27 +34163,12 @@ GuiHostedController::INativeWindowListener (PreAction)
auto x = info.x.value - hoveringWindow->wmWindow.bounds.x1.value;
auto y = info.y.value - hoveringWindow->wmWindow.bounds.y1.value;
auto hitTestResult = PerformHitTest(From(hoveringWindow->listeners), { {x},{y} });
switch (hitTestResult)
auto cursor = GetCursorFromHitTest(hitTestResult, ResourceService());
if (cursor == nullptr)
{
case INativeWindowListener::BorderLeft:
case INativeWindowListener::BorderRight:
nativeWindow->SetWindowCursor(ResourceService()->GetSystemCursor(INativeCursor::SizeWE));
break;
case INativeWindowListener::BorderTop:
case INativeWindowListener::BorderBottom:
nativeWindow->SetWindowCursor(ResourceService()->GetSystemCursor(INativeCursor::SizeNS));
break;
case INativeWindowListener::BorderLeftTop:
case INativeWindowListener::BorderRightBottom:
nativeWindow->SetWindowCursor(ResourceService()->GetSystemCursor(INativeCursor::SizeNWSE));
break;
case INativeWindowListener::BorderRightTop:
case INativeWindowListener::BorderLeftBottom:
nativeWindow->SetWindowCursor(ResourceService()->GetSystemCursor(INativeCursor::SizeNESW));
break;
default:
nativeWindow->SetWindowCursor(hoveringWindow->GetWindowCursor());
cursor = hoveringWindow->GetWindowCursor();
}
nativeWindow->SetWindowCursor(cursor);
}
if (wmWindow)