[sldev] Cleanup and XUI conversion of the MiniMap
Aimee Trescothick
aimee.trescothick at googlemail.com
Wed Jan 14 06:14:21 PST 2009
Rob asked me to bring this up on sl-dev so here it is :)
I was thinking about doing a few small enhancements to the mini-map,
but there didn't seem much point working on this without cleaning up
LLFloaterMap and LLNetMap first, as there's quite a bit of historic
dust and cobwebs in there and it needed conversion to XUI (to allow
i18n of the right click menu), so that's what I've done. I haven't as
yet created a JIRA issue for this work, but have added a meta-issue to
tie together mini-map related things (http://jira.secondlife.com/browse/VWR-11548
) where I will be linking this task along with other related things.
However I was a little concerned this work might collide with or
duplicate things going on internally? It would be good know if this
patch is likely to be accepted, before I start working on a number of
small featurettes to build on top of it. I'm working from Trunk, so
the featurettes to put tooltips on avatars and add avatar profiles to
the right-click menu are already in there and not adversely affected.
The list of changes I've made at the moment is:
1) Converted to use XUI.
2) Made LLFloaterMap a LLFloaterSingleton, moving instance management
inside the class and eliminating gFloaterMap.
3) Replaced gMiniMapScale with LLNetMap::mScale
4) Removed unused panning code from LLNetMap
5) Removed a lot of unused #includes and constants from LLFloaterMap.
6) Removed redundant toggle_map function from llviewermenu.cpp
7) Added code to autohide minor cardinal directions at small window
sizes when they make the map unreadable.
As a (very) minor UI change #7 should possibly be submitted as a
separate issue, but it happened as I was doing the conversion to XUI
and found the minimum dimensions of the window were based on the size
of other controls that no longer exist :)
I was also wondering whether if requires a small act of God to get
things renamed? LLFloaterMap and LLNetMap are named as such for purely
historical reasons, presumably dating right back to before the world
map (LLFloaterWorldMap and LLWorldMapView) existed. These names are
inconsistent and pretty confusing to anyone unfamiliar with this part
of the code. It would be nice to get them renamed to LLFloaterMiniMap
and LLMiniMapView. I stopped short of doing this as I thought it was
probably a sure way to stop the patch getting accepted ;) however it
would be a beneficial change, and now is the time to do it alongside
this cleanup, if ever.
Kind regards,
Aimee T.
More information about the SLDev
mailing list