Skip to content

Feature: Auto Zoom Reset option to Minimap module - #1289

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
JuJuFX-dev:feature/minimap-auto-zoom-reset
Aug 12, 2026
Merged

Feature: Auto Zoom Reset option to Minimap module#1289
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
JuJuFX-dev:feature/minimap-auto-zoom-reset

Conversation

@JuJuFX-dev

@JuJuFX-dev JuJuFX-dev commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds an optional Auto Zoom Reset to the Minimap module. When enabled, the minimap automatically zooms back out to maximum distance (zoom level 0) after a configurable number of seconds without a manual zoom change (scroll wheel or the +/- buttons).

Configured via a single "Reset Zoom" slider (0-15 seconds) placed next to the existing "Free Move Buttons" toggle in the minimap options. 0 (the default) disables the feature entirely, matching current behavior.

How was it tested?

Tested in-game on live retail: enabled the slider at various values (1-15s), zoomed in with the scroll wheel and with the +/- buttons, confirmed the map snaps back to max zoom-out after the configured delay and stays put while actively zooming. Confirmed the slider defaults to 0/disabled on a fresh profile and that existing zoom/scroll behavior is unchanged at 0.

Not tested on the 12.1 PTR client - the change touches only Minimap:GetZoom()/SetZoom(), which the module already calls elsewhere without an IS_121 split, so no divergence is expected, but flagging per the "both clients" criterion.

Screenshots

Not applicable - this is a single options-menu slider added next to an existing row, no layout/visual change beyond one new control.

Checklist

  • New settings default OFF (no behavior change without opt-in) - zoomResetSeconds = 0 by default, which disables the reset path entirely.
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built - RestartZoomResetTimer() reads the setting and returns immediately without creating a timer when the value is 0.
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations) - partially, flagging for review: the feature is inherently a "reset after N seconds of inactivity", so it uses a single-shot C_Timer.NewTimer, cancelled and re-armed only on the actual zoom-change events (scroll wheel, +/- button clicks) - not a per-frame or polling timer. This mirrors the existing debounce-timer pattern already used elsewhere in this file (e.g. the hover-reveal watcher and the free-move-button save). No OnUpdate, no polling loop.
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames - only calls the existing Minimap:GetZoom()/SetZoom() API methods (already used elsewhere in this file for scroll-to-zoom), and hooks the zoom buttons via the existing HookScript pattern.
  • Tested in-game, works on live retail; no load errors on the 12.1 PTR client - live retail tested as above; PTR not tested, see note above.

Adds a "Reset Zoom" slider (0-15s, default 0/disabled) next to Free Move
Buttons that snaps the minimap back to max zoom-out after N seconds of no
manual zoom change (scroll wheel or +/- buttons).
@JuJuFX-dev
JuJuFX-dev force-pushed the feature/minimap-auto-zoom-reset branch from 1bd8ae0 to 62221b3 Compare August 12, 2026 20:04
@EllesmereGaming
EllesmereGaming merged commit 4416f62 into EllesmereGaming:main Aug 12, 2026
1 check passed
@JuJuFX-dev
JuJuFX-dev deleted the feature/minimap-auto-zoom-reset branch August 12, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants