Map rotation setting on right click, from Imprudence.
This commit is contained in:
@@ -111,6 +111,8 @@ LLNetMap::LLNetMap(const std::string& name) :
|
|||||||
(new LLScaleMap())->registerListener(this, "MiniMap.ZoomLevel");
|
(new LLScaleMap())->registerListener(this, "MiniMap.ZoomLevel");
|
||||||
(new LLCenterMap())->registerListener(this, "MiniMap.Center");
|
(new LLCenterMap())->registerListener(this, "MiniMap.Center");
|
||||||
(new LLCheckCenterMap())->registerListener(this, "MiniMap.CheckCenter");
|
(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 LLStopTracking())->registerListener(this, "MiniMap.StopTracking");
|
||||||
(new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking");
|
(new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking");
|
||||||
(new LLShowAgentProfile())->registerListener(this, "MiniMap.ShowProfile");
|
(new LLShowAgentProfile())->registerListener(this, "MiniMap.ShowProfile");
|
||||||
@@ -1108,6 +1110,22 @@ bool LLNetMap::LLCheckCenterMap::handleEvent(LLPointer<LLEvent> event, const LLS
|
|||||||
return true;
|
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)
|
bool LLNetMap::LLStopTracking::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
{
|
{
|
||||||
LLTracker::stopTracking(NULL);
|
LLTracker::stopTracking(NULL);
|
||||||
|
|||||||
@@ -145,6 +145,18 @@ private:
|
|||||||
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
|
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class LLRotateMap : public LLMemberListener<LLNetMap>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
|
||||||
|
};
|
||||||
|
|
||||||
|
class LLCheckRotateMap : public LLMemberListener<LLNetMap>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
|
||||||
|
};
|
||||||
|
|
||||||
class LLStopTracking : public LLMemberListener<LLNetMap>
|
class LLStopTracking : public LLMemberListener<LLNetMap>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -19,6 +19,11 @@
|
|||||||
<on_click function="MiniMap.Center" userdata="1" />
|
<on_click function="MiniMap.Center" userdata="1" />
|
||||||
<on_check function="MiniMap.CheckCenter" userdata="1" />
|
<on_check function="MiniMap.CheckCenter" userdata="1" />
|
||||||
</menu_item_check>
|
</menu_item_check>
|
||||||
|
<menu_item_check bottom_delta="-18" enabled="true" height="18" label="Rotate Mini-Map"
|
||||||
|
left="0" mouse_opaque="true" name="Rotate Mini-Map" width="128">
|
||||||
|
<on_click function="MiniMap.Rotate" userdata="" />
|
||||||
|
<on_check function="MiniMap.CheckRotate" userdata="" />
|
||||||
|
</menu_item_check>
|
||||||
<menu_item_separator />
|
<menu_item_separator />
|
||||||
<menu_item_call bottom_delta="-18" enabled = "false" height="18" label="Stop Tracking"
|
<menu_item_call bottom_delta="-18" enabled = "false" height="18" label="Stop Tracking"
|
||||||
left="0" mouse_opaque="true" name="Stop Tracking" width="128">
|
left="0" mouse_opaque="true" name="Stop Tracking" width="128">
|
||||||
|
|||||||
Reference in New Issue
Block a user