Files
siege_deck/Docs/SiegeDeck/Engine/Input.md
T
darman 45b246c1d7 docs: Initialize comprehensive project documentation
Migrates existing GDD and engine design notes from HacknPlan into a new Obsidian vault.

This establishes a centralized, version-controlled knowledge base covering engine architecture, game constraints, design decisions, and open questions.
2026-09-24 23:55:48 +02:00

780 B

tags
tags
engine
input

Input

  • InputState: per frame, it tracks keys (pressed, held, released), the mouse position and buttons, wheel and drag deltas. It's rebuilt from SDL events in PumpSdlEvents.
  • ActionMap: maps keys and buttons to named actions (Cancel, EndTurn, SpeedUp, RotateCamera, …). Rebindable and saved with settings.
  • ImGui gating: when ImGui wants the mouse or keyboard, game input sees nothing.
  • Picking helpers: screen → ray → ground plane. See Rendering#Picking. Converting a hit to a tile is game code.
  • Card drag and drop and hover are game UI built on InputState plus tweens (Main Loop and Time#Timers and tweens).

Input runs on FrameClock, so it works during the paused planning phase.