Teleport and move to objects by their IM name links
This commit is contained in:
@@ -9357,7 +9357,8 @@ class ListTeleportTo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gAgent.teleportViaLocation(get_av_pos(LFIDBearer::getActiveSelectedID()));
|
||||
const auto&& id = LFIDBearer::getActiveSelectedID();
|
||||
gAgent.teleportViaLocation(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? gObjectList.findObject(id)->getPositionGlobal() : get_av_pos(id));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -9394,7 +9395,8 @@ class ListIsNearby : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(is_nearby(LFIDBearer::getActiveSelectedID()));
|
||||
const auto&& id = LFIDBearer::getActiveSelectedID();
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? gObjectList.findObject(id) : is_nearby(id));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,12 +34,20 @@
|
||||
function="Text.Url" userdata="ShowOnMap" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Teleport to Object Location"
|
||||
label="Teleport to Object URL Location"
|
||||
layout="topleft"
|
||||
name="teleport_to_object">
|
||||
<menu_item_call.on_click
|
||||
function="Text.Url" userdata="Teleport" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To (current location)" name="Teleport To (current location)">
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft" />
|
||||
<menu_item_call
|
||||
|
||||
Reference in New Issue
Block a user