Map rotation setting on right click, from Imprudence.

This commit is contained in:
Siana Gearz
2011-01-08 23:01:30 +01:00
parent 29aef502ea
commit 26a8ffb536
3 changed files with 35 additions and 0 deletions

View File

@@ -111,6 +111,8 @@ LLNetMap::LLNetMap(const std::string& name) :
(new LLScaleMap())->registerListener(this, "MiniMap.ZoomLevel");
(new LLCenterMap())->registerListener(this, "MiniMap.Center");
(new LLCheckCenterMap())->registerListener(this, "MiniMap.CheckCenter");
(new LLRotateMap())->registerListener(this, "MiniMap.Rotate");
(new LLCheckRotateMap())->registerListener(this, "MiniMap.CheckRotate");
(new LLStopTracking())->registerListener(this, "MiniMap.StopTracking");
(new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking");
(new LLShowAgentProfile())->registerListener(this, "MiniMap.ShowProfile");
@@ -1108,6 +1110,22 @@ bool LLNetMap::LLCheckCenterMap::handleEvent(LLPointer<LLEvent> event, const LLS
return true;
}
bool LLNetMap::LLRotateMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
BOOL rotate = gSavedSettings.getBOOL("MiniMapRotate");
gSavedSettings.setBOOL("MiniMapRotate", !rotate);
return true;
}
bool LLNetMap::LLCheckRotateMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLNetMap *self = mPtr;
BOOL enabled = gSavedSettings.getBOOL("MiniMapRotate");
self->findControl(userdata["control"].asString())->setValue(enabled);
return true;
}
bool LLNetMap::LLStopTracking::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLTracker::stopTracking(NULL);