Commit graph

1 commit

Author SHA1 Message Date
Vadim Peretokin
acd82333ae
Add multiple map views support (#8743)
#### Brief overview of PR changes/additions
Open additional 2D map windows showing different areas of the same map.
Views are dockable and controlled via menu or Lua.

  New Lua functions:
  - `createMapView([areaId])` - open a new map window
  - `closeMapView(viewId)` - close a specific window
  - `closeAllMapViews()` - close all extra windows
  - `getMapViewIds()` - list open windows
  - `getMapViewInfo(viewId)` - get window state

  Extended with optional `viewId` parameter:
  - `centerview(roomId, [viewId])`
  - `setMapZoom(zoom, [areaId], [viewId])`
  - `getMapZoom([areaId], [viewId])`

  #### Motivation for adding to Mudlet
Allows viewing multiple map areas simultaneously - useful for navigation
planning, comparing areas, or keeping a zoomed-out overview while
exploring.

Upvoted suggestion in
https://discord.com/channels/283581582550237184/792073945922142259/1402147549585866854

  #### Other info (issues closed, discussion etc)
  **Test case:**
  1. Load a profile with a map
  2. Window → New map window (or run `createMapView()`)
  3. Select different area in new window's dropdown
  4. Verify both views update when moving rooms
  5. Dock/undock the new window
  6. Close via X button or `closeMapView(id)`


https://github.com/user-attachments/assets/1cd38f37-5b3e-4ae2-83e4-ea9478b9f68c
2026-01-18 11:41:17 +01:00