namespace ProjectM.Client
{
///
/// Static bridge from the client input gather (which owns active-device detection) to the presentation
/// layer (), mirroring the PrototypeCameraRig statics idiom. Holds
/// the last detected input scheme so the reticle system can switch the on-screen cursor (mouse
/// crosshair) vs the world reticle (gamepad) without re-deriving raw device state. Process-local and
/// presentation-only — never read by the simulation.
///
public static class AimPresentation
{
/// Active scheme (): 0 = mouse/keyboard, 1 = gamepad.
public static byte Scheme;
/// When true, keeps the OS cursor VISIBLE even while aiming (the
/// editor-only DebugOverlay sets this so its IMGUI buttons stay clickable). Non-#if so the reticle system
/// can read it in any build; nothing sets it outside the editor.
public static bool ForceCursorVisible;
// Static fields can survive editor domain reloads (fast enter-play-mode); reset on every play-enter so a
// stale gamepad value from a prior session can't briefly hide the cursor / show the world reticle before
// the input gather republishes the real scheme.
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.SubsystemRegistration)]
static void ResetOnEnterPlayMode()
{
Scheme = ProjectM.Simulation.InputSchemeId.KeyboardMouse;
ForceCursorVisible = false;
}
}
}