Improve List menu with IsNearby check

Teleport To is now available whenever a user is nearby, regardless of list
The local avs menu's Moderation submenu, Focus, and Track/Untrack has been
adopted into the main avs list menu making the only difference submenuing

Fix track/untrack not working, since it requires the radar to work right
This commit is contained in:
Liru Færs
2019-08-29 15:09:32 -04:00
parent 7c367d4e9c
commit 2e465ba04a
5 changed files with 120 additions and 24 deletions

View File

@@ -9347,6 +9347,26 @@ void parcel_mod_notice_callback(const uuid_vec_t& ids, S32 choice, boost::functi
cb(*it, choice);
}
bool is_nearby(const LLUUID& id);
class ListIsNearby : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
gMenuHolder->findControl(userdata["control"].asString())->setValue(is_nearby(get_focused_list_id_selected()));
return true;
}
};
void track_av(const LLUUID& id);
class ListTrack : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
track_av(get_focused_list_id_selected());
return true;
}
};
void send_eject(const LLUUID& avatar_id, bool ban);
class ListEject : public view_listener_t
{
@@ -9807,6 +9827,8 @@ void initialize_menus()
addMenu(new ListStartConference(), "List.StartConference");
addMenu(new ListStartIM(), "List.StartIM");
addMenu(new ListAbuseReport(), "List.AbuseReport");
addMenu(new ListIsNearby, "List.IsNearby");
addMenu(new ListTrack, "List.Track");
addMenu(new ListEject(), "List.ParcelEject");
addMenu(new ListFreeze(), "List.Freeze");
addMenu(new ListEstateBan(), "List.EstateBan");