From 7d5d0904c14a9185293386218dd707a3e1cad40e Mon Sep 17 00:00:00 2001 From: Paul Churchill Date: Sat, 20 Sep 2008 12:27:44 -0500 Subject: VWR-2072: New Feature -> UI -> IM -> Teleport (other person) Button. --- linden/indra/newview/llimpanel.cpp | 22 ++++++++++++++++++++++ linden/indra/newview/llimpanel.h | 1 + .../default/xui/en-us/floater_instant_message.xml | 3 +++ 3 files changed, 26 insertions(+) (limited to 'linden/indra') diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index ae8bd4b..46a64d4 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp @@ -1246,6 +1246,7 @@ BOOL LLFloaterIMPanel::postBuild() childSetAction("end_call_btn", onClickEndCall, this); childSetAction("send_btn", onClickSend, this); childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); + childSetAction("offer_tp_btn", onClickOfferTeleport, this); childSetAction("moderator_kick_speaker", onKickSpeaker, this); //LLButton* close_btn = getChild("close_btn"); @@ -1395,6 +1396,20 @@ void LLFloaterIMPanel::draw() childSetValue("mute_btn", LLMuteList::getInstance()->isMuted(mOtherParticipantUUID, LLMute::flagVoiceChat)); childSetVisible("mute_btn", LLVoiceClient::voiceEnabled() && mVoiceChannel->isActive()); } + + // enable 'offer teleport' button + if(mDialog == IM_NOTHING_SPECIAL) + { + const LLRelationship* info = NULL; + info = LLAvatarTracker::instance().getBuddyInfo(mOtherParticipantUUID); + childSetEnabled("offer_tp_btn", info->isOnline()); + } + else + { + childSetEnabled("offer_tp_btn", false); + childSetVisible("offer_tp_button", false); + } + LLFloater::draw(); } @@ -1694,6 +1709,13 @@ void LLFloaterIMPanel::onTabClick(void* userdata) self->setInputFocus(TRUE); } +// static +void LLFloaterIMPanel::onClickOfferTeleport(void* userdata) +{ + LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; + + handle_lure(self->mOtherParticipantUUID); +} // static void LLFloaterIMPanel::onClickProfile( void* userdata ) diff --git a/linden/indra/newview/llimpanel.h b/linden/indra/newview/llimpanel.h index 2ed866b..e544154 100644 --- a/linden/indra/newview/llimpanel.h +++ b/linden/indra/newview/llimpanel.h @@ -231,6 +231,7 @@ public: static void onClickProfile( void* userdata ); static void onClickGroupInfo( void* userdata ); + static void onClickOfferTeleport( void* userdata ); static void onClickClose( void* userdata ); static void onClickStartCall( void* userdata ); static void onClickEndCall( void* userdata ); diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml index cb27be6..3a660ab 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml @@ -48,6 +48,9 @@ image_unselected="icn_speaker_dark.tga" label="" left_delta="56" name="mute_btn" tool_tip="Mute voice" width="25" /> +