Rename Radar.TeleportTo to List.TeleportTo, and move the code

This commit is contained in:
Liru Færs
2020-01-07 11:53:23 -05:00
parent 4a293ff1e1
commit 8283422717
6 changed files with 15 additions and 15 deletions

View File

@@ -400,15 +400,6 @@ namespace
}
};
class RadarTeleportTo : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
gAgent.teleportViaLocation(get_av_pos(LFIDBearer::getActiveSelectedID()));
return true;
}
};
class RadarAnnounceKeys : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -428,7 +419,6 @@ void add_radar_listeners()
addMenu(new RadarFocus, "Radar.Focus");
addMenu(new RadarFocusPrev, "Radar.FocusPrev");
addMenu(new RadarFocusNext, "Radar.FocusNext");
addMenu(new RadarTeleportTo, "Radar.TeleportTo");
addMenu(new RadarAnnounceKeys, "Radar.AnnounceKeys");
}

View File

@@ -9352,6 +9352,16 @@ class ListStartIM : public view_listener_t
}
};
const LLVector3d& get_av_pos(const LLUUID& id);
class ListTeleportTo : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
gAgent.teleportViaLocation(get_av_pos(LFIDBearer::getActiveSelectedID()));
return true;
}
};
class ListAbuseReport : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -9389,7 +9399,6 @@ class ListIsNearby : public view_listener_t
}
};
const LLVector3d& get_av_pos(const LLUUID& id);
class ListGoTo : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -9931,6 +9940,7 @@ void initialize_menus()
addMenu(new ListStartCall(), "List.StartCall");
addMenu(new ListStartConference(), "List.StartConference");
addMenu(new ListStartIM(), "List.StartIM");
addMenu(new ListTeleportTo, "List.TeleportTo");
addMenu(new ListAbuseReport(), "List.AbuseReport");
addMenu(new ListIsNearby, "List.IsNearby");
addMenu(new ListGoTo, "List.GoTo");

View File

@@ -55,7 +55,7 @@
<on_enable function="List.EnableAnySelected"/>
</menu_item_call>
<menu_item_call label="Teleport To" name="Teleport To">
<on_click function="Radar.TeleportTo"/>
<on_click function="List.TeleportTo"/>
<on_enable function="List.EnableSingleSelected"/>
<on_visible function="List.IsNearby"/>
</menu_item_call>

View File

@@ -54,7 +54,7 @@
<on_enable function="List.EnableAnySelected"/>
</menu_item_call>
<menu_item_call label="Teleport To" name="Teleport To">
<on_click function="Radar.TeleportTo"/>
<on_click function="List.TeleportTo"/>
<on_enable function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Request Teleport" name="Request Teleport">

View File

@@ -55,7 +55,7 @@
<on_enable function="List.EnableAnySelected"/>
</menu_item_call>
<menu_item_call label="Teleport To" name="Teleport To" shortcut="control|Enter">
<on_click function="Radar.TeleportTo"/>
<on_click function="List.TeleportTo"/>
<on_enable function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Request Teleport" name="Request Teleport">

View File

@@ -42,7 +42,7 @@
<on_click function="List.OfferTeleport"/>
</menu_item_call>
<menu_item_call label="Teleport To" name="Teleport To">
<on_click function="Radar.TeleportTo"/>
<on_click function="List.TeleportTo"/>
<on_visible function="List.IsNearby"/>
</menu_item_call>
<menu_item_call label="Request Teleport" name="Request Teleport">