Files
sacred_k/src/mods/hud.h
T
khallaandClaude Opus 5.5 e914bd1590 TAB map content centred again; key bindings no longer pass on Ctrl/Alt
- megamap: the zoomed view (0x6cc950) is shared by the large map and the
  TAB overview map; its centre is now set per call from the drawing
  window's offset (hud::DrawOffsetX) instead of fixed to the render width
- input: drop the Ctrl/Alt pass-through; GetKeyState reports Alt as held
  after Alt+Tab, which switched all bindings back to the game's handling

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 01:54:39 +02:00

31 lines
1.2 KiB
C++

#pragma once
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();
// Horizontal offset the current thread's UI drawing is shifted by (the
// outermost hooked window's; 0 outside).
int DrawOffsetX();
// The mouse cursor object as the current thread should see it: inside a moved
// window, a private copy with x shifted by CursorOffsetX().
void* CursorFor(void* cursor);
// Tooltips that are dialogs of their own (e.g. quest dialogs: they became
// visible while no moved window was under the cursor) and are visible now.
int VisibleDialogTooltips(void** out, int max);
// For mods that hook a centred window themselves: run body(context) as the
// HUD layer runs the window's render method (drawing shifted, the cursor seen
// shifted) or event handler (mouse position shifted by the window's offset).
int RenderCentred(void* window, int (*body)(void* context), void* context);
int HandleCentred(void* event, int (*body)(void* context), void* context);
} // namespace mods::hud