Add Find on Map to avatar UI menus
This commit is contained in:
@@ -9422,6 +9422,26 @@ class ListTeleportTo : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class ListStalk : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLAvatarActions::showOnMap(LFIDBearer::getActiveSelectedID());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListStalkable : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
BOOL is_agent_mappable(const LLUUID& agent_id);
|
||||
const auto& ids = LFIDBearer::getActiveSelectedIDs();
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(ids.size() == 1 && is_agent_mappable(ids[0]));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListAbuseReport : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -10049,6 +10069,8 @@ void initialize_menus()
|
||||
addMenu(new ListStartCall(), "List.StartCall");
|
||||
addMenu(new ListStartConference(), "List.StartConference");
|
||||
addMenu(new ListStartIM(), "List.StartIM");
|
||||
addMenu(new ListStalk, "List.Stalk");
|
||||
addMenu(new ListStalkable, "List.Stalkable");
|
||||
addMenu(new ListTeleportTo, "List.TeleportTo");
|
||||
addMenu(new ListAbuseReport(), "List.AbuseReport");
|
||||
addMenu(new ListIsNearby, "List.IsNearby");
|
||||
|
||||
@@ -68,6 +68,10 @@
|
||||
<on_click function="List.RequestTeleport"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Find on Map" name="Find on Map">
|
||||
<on_click function="List.Stalk"/>
|
||||
<on_visible function="List.Stalkable"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Share" name="Share">
|
||||
<on_click function="List.Share"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
|
||||
@@ -65,6 +65,10 @@
|
||||
<on_click function="List.RequestTeleport"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Find on Map" name="Find on Map">
|
||||
<on_click function="List.Stalk"/>
|
||||
<on_visible function="List.Stalkable"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Share" name="Share">
|
||||
<on_click function="List.Share"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
|
||||
@@ -65,6 +65,10 @@
|
||||
<on_click function="List.RequestTeleport"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Find on Map" name="Find on Map">
|
||||
<on_click function="List.Stalk"/>
|
||||
<on_visible function="List.Stalkable"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Share" name="Share">
|
||||
<on_click function="List.Share"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
<menu_item_call label="Request Teleport" name="Request Teleport">
|
||||
<on_click function="List.RequestTeleport"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Find on Map" name="Find on Map">
|
||||
<on_click function="List.Stalk"/>
|
||||
<on_visible function="List.Stalkable"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Share" name="Share">
|
||||
<on_click function="List.Share"/>
|
||||
</menu_item_call>
|
||||
|
||||
Reference in New Issue
Block a user