From d5555e3df7bf308baf2ffd7180ac443b7839672c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 20 Mar 2014 14:47:06 +0100 Subject: [PATCH] FIRE-10043: Add teleport to landing point button in about land floater --- indra/newview/llfloaterland.cpp | 26 + indra/newview/llfloaterland.h | 5 + .../default/xui/de/floater_about_land.xml | 1 + .../default/xui/en/floater_about_land.xml | 10 + .../latency/xui/de/floater_about_land.xml | 500 ++++++++++++++++++ .../latency/xui/en/floater_about_land.xml | 10 + .../vintage/xui/de/floater_about_land.xml | 1 + .../vintage/xui/en/floater_about_land.xml | 10 + 8 files changed, 563 insertions(+) create mode 100644 indra/newview/skins/latency/xui/de/floater_about_land.xml diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 789b082621..c7360b6ae7 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2037,6 +2037,11 @@ BOOL LLPanelLandOptions::postBuild() mLandingTypeCombo = getChild( "landing type"); childSetCommitCallback("landing type", onCommitAny, this); + // FIRE-10043: Teleport to LP button + mTeleportToLandingPointBtn = getChild("teleport_to_landing_point"); + mTeleportToLandingPointBtn->setCommitCallback(boost::bind(&LLPanelLandOptions::onClickTeleport, this)); + // + return TRUE; } @@ -2103,6 +2108,10 @@ void LLPanelLandOptions::refresh() mClearBtn->setEnabled(FALSE); mMatureCtrl->setEnabled(FALSE); + + // FIRE-10043: Teleport to LP button + mTeleportToLandingPointBtn->setEnabled(FALSE); + // } else { @@ -2175,6 +2184,9 @@ void LLPanelLandOptions::refresh() if (pos.isExactlyZero()) { mLocationText->setTextArg("[LANDING]", getString("landing_point_none")); + // FIRE-10043: Teleport to LP button + mTeleportToLandingPointBtn->setEnabled(FALSE); + // } else { @@ -2183,6 +2195,9 @@ void LLPanelLandOptions::refresh() llround(pos.mV[VY]), llround(pos.mV[VZ]), user_look_at_angle)); + // FIRE-10043: Teleport to LP button + mTeleportToLandingPointBtn->setEnabled(TRUE); + // } mSetBtn->setEnabled( can_change_landing_point ); @@ -2487,6 +2502,17 @@ void LLPanelLandOptions::onClickClear(void* userdata) self->refresh(); } +// FIRE-10043: Teleport to LP button +void LLPanelLandOptions::onClickTeleport() +{ + LLParcel* selected_parcel = mParcel->getParcel(); + LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + if (selected_parcel && !selected_parcel->getUserLocation().isExactlyZero() && region) + { + gAgent.teleportViaLocation(region->getPosGlobalFromRegion(selected_parcel->getUserLocation())); + } +} +// //--------------------------------------------------------------------------- // LLPanelLandAccess diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index 1b5eeb127d..363181035c 100755 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -334,6 +334,9 @@ private: static void onClickSet(void* userdata); static void onClickClear(void* userdata); + // FIRE-10043: Teleport to LP button + void onClickTeleport(); + private: S32 getDirectoryFee(); LLCheckBoxCtrl* mCheckEditObjects; @@ -355,6 +358,8 @@ private: LLTextBox* mLocationText; LLButton* mSetBtn; LLButton* mClearBtn; + // FIRE-10043: Teleport to LP button + LLButton* mTeleportToLandingPointBtn; LLCheckBoxCtrl *mMatureCtrl; LLCheckBoxCtrl *mPushRestrictionCtrl; diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml index 3b2e68185f..edd5358a67 100755 --- a/indra/newview/skins/default/xui/de/floater_about_land.xml +++ b/indra/newview/skins/default/xui/de/floater_about_land.xml @@ -391,6 +391,7 @@ Nur große Parzellen können in der Suche aufgeführt werden.