Is there a way to capture the current zoom level of the mapper? I'd like to capture a selection of zoom levels and then use them in preset zoom buttons for my radar map thing.
Drevarr
Mapper Zoom Level
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Mapper Zoom Level
No, there are two lua commands related to this:
I did code a prototype for this sort of thing recently and tried to implement:
I came to a bit of a stop on this though, because I tried to rationalise the 3D mapper controls which though having four sliders labelled as a scale and three rotations are not... However, I think that I might be able to salvage most of the working stuff from that - add the zoom getting command you want and roll something out - but there are a few other things on my To-Do list that have a urgent against them.
tl;dr;
No - not yet!
- setMapperView((float)x, (float)y, (float)z, (float)zoom) - which is NOT implemented internally {developer note: TMap::setView(x, y, z, zoom) is a dummy, it was nuked by Heiko in "git update to Mudlet-1.2.0-pre4" on 24 Aug 2010}
- setMapZoom((int) zoom) - which sets the zoom of the 2D mapper only
I did code a prototype for this sort of thing recently and tried to implement:
- getCurrentPlayerRoomId() - returns Mudlet's idea of where the player currently is (the "Red" room!)
- setCurrentPlayerRoomId((int) roomId) - unlike centerview() does NOT scroll the map to the given room
- getViewCenterCoordinates() - returns 5 values:
- 2 0r 3 - whether the map is currently showing the 2 or 3D map
- x
- y
- z coordinates at the CENTER of the map (for the 3D map the centre of what the camera is AIMED at, not where the camera is!)
- areaId - which area is being displayed - without which the coordinates aren't much use!
- setViewCenterCoordinates((int)x,(int)y,(int)z) - moves the centre of the map to the given coordinates.
- getGridMode((int)areaId) - already noted as being missing, simple returns true or false for the given area.
I came to a bit of a stop on this though, because I tried to rationalise the 3D mapper controls which though having four sliders labelled as a scale and three rotations are not... However, I think that I might be able to salvage most of the working stuff from that - add the zoom getting command you want and roll something out - but there are a few other things on my To-Do list that have a urgent against them.
tl;dr;
No - not yet!
Re: Mapper Zoom Level
I like to prototype functions. Look forward to seeing those rollout.