Mouse on the world map (click for a waypoint, drag to pan, wheel to zoom) #78

Closed
opened 2026-12-05 17:36:21 +00:00 by github-bot · 0 comments
Owner

@⁠IndianStalker on GitHub · 2026-12-05 17:36 UTC · original

With mouse and keyboard on (anything but LARP_CONTROLS=pad), the world map now works with the mouse, the way Darner's does:

  • Left click (no drag): A, so a waypoint where the cursor is, or the blip under it
  • Left or middle drag: pans the map under the cursor (LARP_MAP_DRAG_SENS, default 2.5; LARP_MAP_DRAG_INVERT=1)
  • Wheel: zooms around the cursor (LARP_MAP_WHEEL_INVERT=1 turns it around); in an interior, wheel down leaves the interior view
  • Middle click: X, right click: B (back), side buttons: LB / RB

While the map is open, the mouse capture is let go and the map's own cursor follows the Windows cursor. The capture comes back with the first mouse move after the map closes. Alt-Tab and the F10 menu behave as before.

How: new crates/larp-hle/src/mapmouse.rs hooks MapInputHandler update / bind / unbind / destructor and the calls that fetch the map camera and centre its cursor. Build 1.0.2.1 only: every prologue is checked inside the image first, so another build gets no hook and nothing changes. LARP_MAP_MOUSE=0 turns it off. settings::is_open() (new, 3 lines) keeps it out of the way while the F10 menu is open. gameinput/mouse.rs releases/retakes the capture and adds the map's click pulses to the pad.

Works with #46: crates/larp-loader/src/callhook.rs is the same file as in #46, and the two PRs merge cleanly in either order (checked).

Credit: the map hooks and callhook.rs are Darner's (TrustNo1, GPL-3.0, git.gtahub.st/trustno1/Darner).

Tested: builds on main (0f03265) with no new warnings; unit tests pass. The same map code is in my mouse + keyboard build that I'm playing now; I'll add results here.

🤖 Generated with Claude Code

Pull request details or commits were not available from GitHub; kept as an issue.

**@⁠IndianStalker** on GitHub · 2026-12-05 17:36 UTC · [original](https://github.com/gamingwithhomie/larp/pull/78) With mouse and keyboard on (anything but `LARP_CONTROLS=pad`), the world map now works with the mouse, the way Darner's does: - **Left click** (no drag): A, so a waypoint where the cursor is, or the blip under it - **Left or middle drag**: pans the map under the cursor (`LARP_MAP_DRAG_SENS`, default 2.5; `LARP_MAP_DRAG_INVERT=1`) - **Wheel**: zooms around the cursor (`LARP_MAP_WHEEL_INVERT=1` turns it around); in an interior, wheel down leaves the interior view - **Middle click**: X, **right click**: B (back), **side buttons**: LB / RB While the map is open, the mouse capture is let go and the map's own cursor follows the Windows cursor. The capture comes back with the first mouse move after the map closes. Alt-Tab and the F10 menu behave as before. **How:** new `crates/larp-hle/src/mapmouse.rs` hooks `MapInputHandler` update / bind / unbind / destructor and the calls that fetch the map camera and centre its cursor. Build 1.0.2.1 only: every prologue is checked inside the image first, so another build gets no hook and nothing changes. `LARP_MAP_MOUSE=0` turns it off. `settings::is_open()` (new, 3 lines) keeps it out of the way while the F10 menu is open. `gameinput/mouse.rs` releases/retakes the capture and adds the map's click pulses to the pad. **Works with #46:** `crates/larp-loader/src/callhook.rs` is the same file as in #46, and the two PRs merge cleanly in either order (checked). **Credit:** the map hooks and `callhook.rs` are Darner's (TrustNo1, GPL-3.0, git.gtahub.st/trustno1/Darner). **Tested:** builds on `main` (`0f03265`) with no new warnings; unit tests pass. The same map code is in my mouse + keyboard build that I'm playing now; I'll add results here. 🤖 Generated with [Claude Code](https://claude.com/claude-code) *Pull request details or commits were not available from GitHub; kept as an issue.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 17:36:21 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/gamingwithhomie--larp#78
No description provided.