HUD: inventory drag & drop, UI hit tests, centred overlays
- Mouse move events carry previous and current x (+4, +0xc); button events x at +8. All are shifted, and restored to the saved values. - The cursor object's previous x (+0xc) is shifted too: picking up an item writes the cursor position into the event (0x6559a0). - GetMouseClientPos returns the shifted position inside a moved window. - Window hit tests (vf1c 0x731d40, taskbar 0x6dfb10) called outside a window scope, e.g. 'is UI under the cursor' for world picking (0x75a370), use the offset the top-level window was last drawn with. - The item carried by the cursor (0x6555e0) and the UI manager's centred status line / message box (0x75bbf0, 0x75c200) draw with the centre offset. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2760b35829
commit
d5e3da549a
3 files changed
+175
-35
No files matched your search
@@ -5,4 +5,8 @@ namespace mods::hud {
|
||||
// Installs the Direct3D device hooks the HUD layout needs (once per device).
|
||||
void OnDevice(void* device);
|
||||
|
||||
// Horizontal offset of the moved window whose render or event method runs on
|
||||
// the current thread (0 outside): polled mouse positions are reduced by it.
|
||||
int CursorOffsetX();
|
||||
|
||||
} // namespace mods::hud
|
||||
Reference in new issue
Block a user