HUD: hover and tooltips for moved windows
Windows poll the mouse cursor object (0xcdbadc, x +4) for hover; it is shifted inside a moved window's render/event scope like the events. Tooltips are separate windows placed by the hovered window in its 1024 layout, so cUI_Tooltip renders with the offset of the moved window under the cursor. Adds Move-To to the test input helpers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a640f2fb17
commit
2853f82627
3 files changed
+103
-7
No files matched your search
@@ -75,3 +75,13 @@ function Save-Screen([string]$Path, [int]$Width = 3440, [int]$Height = 1440) {
|
||||
$graphics.Dispose(); $bitmap.Dispose()
|
||||
$full
|
||||
}
|
||||
|
||||
# Moves the cursor in small steps (the game only sees real mouse movement).
|
||||
function Move-To([int]$X, [int]$Y, [int]$AfterMs = 800) {
|
||||
[SacredRe.Input]::SetCursorPos($X - 20, $Y - 20) | Out-Null
|
||||
for ($i = 1; $i -le 10; $i++) {
|
||||
Start-Sleep -Milliseconds 20
|
||||
[SacredRe.Input]::SetCursorPos($X - 20 + 2 * $i, $Y - 20 + 2 * $i) | Out-Null
|
||||
}
|
||||
Start-Sleep -Milliseconds $AfterMs
|
||||
}
|
||||
Reference in new issue
Block a user