From 9cac312f57391792e9fce380c2c38ae4060ae1d7 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 11 Jun 2012 10:55:18 -0700 Subject: Backed out changeset: 18b06d44c5a3 --- indra/newview/llpathfindingmanager.cpp | 47 ---------------------------------- 1 file changed, 47 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 85a315a3e7..e282a3e2f4 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -93,25 +93,6 @@ public: LLHTTPRegistration gHTTPRegistrationAgentStateChangeNode(SIM_MESSAGE_AGENT_STATE_UPDATE); -//--------------------------------------------------------------------------- -// StinsonResponder -//--------------------------------------------------------------------------- - -class StinsonResponder : public LLHTTPClient::Responder -{ -public: - StinsonResponder(const std::string &pCapabilityURL); - virtual ~StinsonResponder(); - - virtual void result(const LLSD &pContent); - virtual void error(U32 pStatus, const std::string& pReason); - -protected: - -private: - std::string mCapabilityURL; -}; - //--------------------------------------------------------------------------- // NavMeshStatusResponder //--------------------------------------------------------------------------- @@ -538,10 +519,6 @@ void LLPathfindingManager::requestGetCharacters(request_id_t pRequestId, object_ LLHTTPClient::ResponderPtr charactersResponder = new CharactersResponder(charactersURL, pRequestId, pCharactersCallback); LLHTTPClient::get(charactersURL, charactersResponder); - - std::string googleURL = "http://www.google.com/"; - LLHTTPClient::ResponderPtr stinsonResponder = new StinsonResponder(googleURL); - LLHTTPClient::get(googleURL, stinsonResponder); } } } @@ -825,30 +802,6 @@ void LLNavMeshSimStateChangeNode::post(ResponsePtr pResponse, const LLSD &pConte LLPathfindingManager::getInstance()->handleNavMeshStatusUpdate(navMeshStatus); } -//--------------------------------------------------------------------------- -// StinsonResponder -//--------------------------------------------------------------------------- - -StinsonResponder::StinsonResponder(const std::string &pCapabilityURL) - : LLHTTPClient::Responder(), - mCapabilityURL(pCapabilityURL) -{ -} - -StinsonResponder::~StinsonResponder() -{ -} - -void StinsonResponder::result(const LLSD &pContent) -{ - llinfos << "STINSON DEBUG: success to URL '" << mCapabilityURL << "' with content " << pContent << llendl; -} - -void StinsonResponder::error(U32 pStatus, const std::string& pReason) -{ - llwarns << "STINSON DEBUG: error with request to URL '" << mCapabilityURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl; -} - //--------------------------------------------------------------------------- // LLAgentStateChangeNode //--------------------------------------------------------------------------- -- cgit v1.2.3 From c352483f62540d67e6ff5704d272c0b2f0b08222 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 11 Jun 2012 13:52:19 -0700 Subject: PATH-704: Enforcing permanency only for static objects on neighboring regions. --- indra/newview/lltoolbrush.cpp | 12 ------------ indra/newview/llviewerobject.cpp | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index a963ef2ea6..8c5b534d63 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -247,12 +247,6 @@ void LLToolBrushLand::modifyLandInSelectionGlobal() } } - if (!gAgent.isGodlike() && !gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") && !LLPathfindingManager::getInstance()->isAllowAlterPermanent()) - { - alertNoTerraformWhileFrozen(); - return; - } - for(region_list_t::iterator iter = mLastAffectedRegions.begin(); iter != mLastAffectedRegions.end(); ++iter) { @@ -389,12 +383,6 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask) return TRUE; } - if (!gAgent.isGodlike() && !gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") && !LLPathfindingManager::getInstance()->isAllowAlterPermanent()) - { - alertNoTerraformWhileFrozen(); - return TRUE; - } - LLVector3 pos_region = region_position.getPositionRegion(); U32 grids = regionp->getLand().mGridsPerEdge; S32 i = llclamp( (S32)pos_region.mV[VX], 0, (S32)grids ); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index bfde167f18..2c4392ad33 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5304,7 +5304,7 @@ void LLViewerObject::markForUpdate(BOOL priority) bool LLViewerObject::isPermanentEnforced() const { - return flagObjectPermanent() && !LLPathfindingManager::getInstance()->isAllowAlterPermanent() && !gAgent.isGodlike(); + return flagObjectPermanent() && (mRegionp != gAgent.getRegion()) && !gAgent.isGodlike(); } bool LLViewerObject::getIncludeInSearch() const -- cgit v1.2.3 From ff7223fafef58d9f8025e97fee87cf7911d93ccf Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 11 Jun 2012 14:45:59 -0700 Subject: PATH-706: Removing enforcement on frozen/unfrozen state from the linksets floater. Also, removing handlers for agent state change. --- indra/newview/llfloaterpathfindinglinksets.cpp | 30 ++-------------------- indra/newview/llfloaterpathfindinglinksets.h | 7 ----- indra/newview/llpathfindingmanager.cpp | 5 ---- indra/newview/llpathfindingmanager.h | 1 - indra/newview/llviewermenu.cpp | 9 ------- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 6 files changed, 3 insertions(+), 51 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 1d7f165ad9..8488ee1aa3 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -60,26 +60,6 @@ // LLFloaterPathfindingLinksets //--------------------------------------------------------------------------- -void LLFloaterPathfindingLinksets::onOpen(const LLSD& pKey) -{ - LLFloaterPathfindingObjects::onOpen(pKey); - - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLFloaterPathfindingLinksets::onAgentStateChange, this, _1)); - } -} - -void LLFloaterPathfindingLinksets::onClose(bool pIsAppQuitting) -{ - if (mAgentStateSlot.connected()) - { - mAgentStateSlot.disconnect(); - } - - LLFloaterPathfindingObjects::onClose(pIsAppQuitting); -} - void LLFloaterPathfindingLinksets::openLinksetsEditor() { LLFloaterReg::toggleInstanceOrBringToFront("pathfinding_linksets"); @@ -107,8 +87,7 @@ LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed) mLabelEditD(NULL), mEditD(NULL), mApplyEditsButton(NULL), - mBeaconColor(), - mAgentStateSlot() + mBeaconColor() { } @@ -337,11 +316,6 @@ void LLFloaterPathfindingLinksets::onApplyChangesClicked() applyEdit(); } -void LLFloaterPathfindingLinksets::onAgentStateChange(LLPathfindingManager::EAgentState pAgentState) -{ - updateControls(); -} - void LLFloaterPathfindingLinksets::applyFilters() { rebuildObjectsScrollList(); @@ -530,7 +504,7 @@ bool LLFloaterPathfindingLinksets::isShowCannotBeVolumeWarning(LLPathfindingLink void LLFloaterPathfindingLinksets::updateStateOnEditFields() { int numSelectedItems = getNumSelectedObjects(); - bool isEditEnabled = ((numSelectedItems > 0) && LLPathfindingManager::getInstance()->isAllowAlterPermanent()); + bool isEditEnabled = (numSelectedItems > 0); mEditLinksetUse->setEnabled(isEditEnabled); diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h index 4b19f09cda..8c464dc1d5 100644 --- a/indra/newview/llfloaterpathfindinglinksets.h +++ b/indra/newview/llfloaterpathfindinglinksets.h @@ -46,10 +46,6 @@ class LLVector3; class LLFloaterPathfindingLinksets : public LLFloaterPathfindingObjects { public: - - virtual void onOpen(const LLSD& pKey); - virtual void onClose(bool pIsAppQuitting); - static void openLinksetsEditor(); protected: @@ -78,7 +74,6 @@ private: void onClearFiltersClicked(); void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl); void onApplyChangesClicked(); - void onAgentStateChange(LLPathfindingManager::EAgentState pAgentState); void applyFilters(); void clearFilters(); @@ -131,8 +126,6 @@ private: LLButton *mApplyEditsButton; LLColor4 mBeaconColor; - - LLPathfindingManager::agent_state_slot_t mAgentStateSlot; }; #endif // LL_LLFLOATERPATHFINDINGLINKSETS_H diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index e282a3e2f4..5e2a9e1213 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -292,11 +292,6 @@ bool LLPathfindingManager::isPathfindingNavMeshVersioningEnabledForCurrentRegion } #endif // DEPRECATED_UNVERSIONED_NAVMESH -bool LLPathfindingManager::isAllowAlterPermanent() -{ - return (!isPathfindingEnabledForCurrentRegion() || (getAgentState() == kAgentStateUnfrozen)); -} - bool LLPathfindingManager::isAllowViewTerrainProperties() const { LLViewerRegion* region = getCurrentRegion(); diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h index 3c9af91e7b..1ae6e06b40 100644 --- a/indra/newview/llpathfindingmanager.h +++ b/indra/newview/llpathfindingmanager.h @@ -80,7 +80,6 @@ public: bool isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX() const; #endif // DEPRECATED_UNVERSIONED_NAVMESH - bool isAllowAlterPermanent(); bool isAllowViewTerrainProperties() const; LLPathfindingNavMesh::navmesh_slot_t registerNavMeshListenerForRegion(LLViewerRegion *pRegion, LLPathfindingNavMesh::navmesh_callback_t pNavMeshCallback); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6944ae1a9b..5a0239c2e4 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4806,14 +4806,6 @@ class LLToolsEnablePathfinding : public view_listener_t } }; -class LLToolsEnablePathfindingLinksets : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isAllowAlterPermanent(); - } -}; - // Round the position of all root objects to the grid class LLToolsSnapObjectXY : public view_listener_t { @@ -8209,7 +8201,6 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding"); - view_listener_t::addMenu(new LLToolsEnablePathfindingLinksets(), "Tools.EnablePathfindingLinksets"); // Help menu // most items use the ShowFloater method diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ad02beff7a..7b21f1f135 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -967,7 +967,7 @@ function="Floater.ToggleOrBringToFront" parameter="pathfinding_linksets" /> + function="Tools.EnablePathfinding" /> Date: Mon, 11 Jun 2012 17:46:39 -0400 Subject: WIP:path-703 Adding icon to slurl bar to indicate if dynamic pathfinding is enabled or disbled. --- indra/newview/lllocationinputctrl.cpp | 20 ++++++++++++++++---- indra/newview/lllocationinputctrl.h | 7 +++++-- indra/newview/llviewerregion.cpp | 6 ++++++ indra/newview/llviewerregion.h | 3 +++ .../default/textures/icons/Pathfinding_Dynamic.png | Bin 0 -> 683 bytes indra/newview/skins/default/textures/textures.xml | 2 ++ indra/newview/skins/default/xui/en/strings.xml | 2 +- .../skins/default/xui/en/widgets/location_input.xml | 9 +++++++++ 8 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 025181ead5..a6b0f5b81c 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -191,7 +191,8 @@ LLLocationInputCtrl::Params::Params() damage_icon("damage_icon"), damage_text("damage_text"), see_avatars_icon("see_avatars_icon"), - maturity_help_topic("maturity_help_topic") + maturity_help_topic("maturity_help_topic"), + pathfinding_dynamic_icon("pathfinding_dynamic_icon") { } @@ -270,7 +271,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) if (p.icon_maturity_general()) { mIconMaturityGeneral = p.icon_maturity_general; - } + } if (p.icon_maturity_adult()) { mIconMaturityAdult = p.icon_maturity_adult; @@ -279,7 +280,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) { mIconMaturityModerate = p.icon_maturity_moderate; } - + LLButton::Params maturity_button = p.maturity_button; mMaturityButton = LLUICtrlFactory::create(maturity_button); addChild(mMaturityButton); @@ -336,7 +337,14 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mParcelIcon[DAMAGE_ICON] = LLUICtrlFactory::create(damage_icon); mParcelIcon[DAMAGE_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, DAMAGE_ICON)); addChild(mParcelIcon[DAMAGE_ICON]); - + + LLIconCtrl::Params pathfinding_dynamic_icon = p.pathfinding_dynamic_icon; + pathfinding_dynamic_icon.tool_tip = LLTrans::getString("PathfindingDynamicTooltip"); + pathfinding_dynamic_icon.mouse_opaque = true; + mParcelIcon[PATHFINDING_DYNAMIC] = LLUICtrlFactory::create(pathfinding_dynamic_icon); + mParcelIcon[PATHFINDING_DYNAMIC]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, PATHFINDING_DYNAMIC)); + addChild(mParcelIcon[PATHFINDING_DYNAMIC]); + LLTextBox::Params damage_text = p.damage_text; damage_text.tool_tip = LLTrans::getString("LocationCtrlDamageTooltip"); damage_text.mouse_opaque = true; @@ -819,6 +827,7 @@ void LLLocationInputCtrl::refreshParcelIcons() bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel); bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel); bool see_avs = current_parcel->getSeeAVs(); + bool pathfinding_dynamic = true;// gAgent.getRegion()->dynamicPathfindingEnabled(); // Most icons are "block this ability" mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); @@ -827,6 +836,9 @@ void LLLocationInputCtrl::refreshParcelIcons() mParcelIcon[BUILD_ICON]->setVisible( !allow_build ); mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); + //prep# + mParcelIcon[PATHFINDING_DYNAMIC]->setVisible( pathfinding_dynamic ); + mDamageText->setVisible(allow_damage); mParcelIcon[SEE_AVATARS_ICON]->setVisible( !see_avs ); diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index ed47ba73e3..e007369310 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -78,7 +78,8 @@ public: build_icon, scripts_icon, damage_icon, - see_avatars_icon; + see_avatars_icon, + pathfinding_dynamic_icon; Optional damage_text; Params(); }; @@ -116,7 +117,8 @@ private: SCRIPTS_ICON, // 4 DAMAGE_ICON, // 5 SEE_AVATARS_ICON, // 6 - ICON_COUNT // 7 total + PATHFINDING_DYNAMIC,// 7 + ICON_COUNT // 8 total }; friend class LLUICtrlFactory; @@ -184,6 +186,7 @@ private: LLPointer mIconMaturityGeneral; LLPointer mIconMaturityAdult; LLPointer mIconMaturityModerate; + LLPointer mIconPathfindingDynamic; std::string mAddLandmarkTooltip; std::string mEditLandmarkTooltip; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 243231c65a..a7617b1028 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1151,6 +1151,7 @@ void LLViewerRegion::getInfo(LLSD& info) void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features) { sim_features = mSimulatorFeatures; + } void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) @@ -1836,4 +1837,9 @@ bool LLViewerRegion::meshRezEnabled() const mSimulatorFeatures["MeshRezEnabled"].asBoolean()); } +bool LLViewerRegion::dynamicPathfindingEnabled() const +{ + return ( mSimulatorFeatures.has("DynamicPathfindingEnabled") && + mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean()); +} diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 6004165b0e..7bf53ba542 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -285,6 +285,9 @@ public: void getSimulatorFeatures(LLSD& info); void setSimulatorFeatures(const LLSD& info); + + bool dynamicPathfindingEnabled() const; + typedef enum { CACHE_MISS_TYPE_FULL = 0, diff --git a/indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png b/indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png new file mode 100644 index 0000000000..2c485aef0d Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index d5d58235a4..1b104bb766 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -433,6 +433,8 @@ with the same filename but different name + + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 84532c4c2b..15963af960 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3325,7 +3325,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Moderate Region General Region Avatars visible and chat allowed outside of this parcel - + Dynamic Pathfinding Enabled [APP_NAME] Update diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 44436fb6f2..a9cb5f83ed 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -112,6 +112,15 @@ follows="right|top" image_name="Parcel_Health_Dark" /> + Date: Mon, 11 Jun 2012 15:00:33 -0700 Subject: PATH-710: Removing the pathfinding basic floater and supporting class. --- indra/newview/CMakeLists.txt | 2 - indra/newview/app_settings/commands.xml | 10 -- indra/newview/llfloaterpathfindingbasic.cpp | 167 --------------------- indra/newview/llfloaterpathfindingbasic.h | 71 --------- indra/newview/llviewerfloaterreg.cpp | 2 - indra/newview/skins/default/textures/textures.xml | 1 - .../default/xui/en/floater_pathfinding_basic.xml | 79 ---------- indra/newview/skins/default/xui/en/menu_viewer.xml | 9 -- indra/newview/skins/default/xui/en/strings.xml | 2 - 9 files changed, 343 deletions(-) delete mode 100644 indra/newview/llfloaterpathfindingbasic.cpp delete mode 100644 indra/newview/llfloaterpathfindingbasic.h delete mode 100644 indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0be289052c..b47615b198 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -218,7 +218,6 @@ set(viewer_SOURCE_FILES llfloaterobjectweights.cpp llfloateropenobject.cpp llfloateroutbox.cpp - llfloaterpathfindingbasic.cpp llfloaterpathfindingcharacters.cpp llfloaterpathfindingconsole.cpp llfloaterpathfindinglinksets.cpp @@ -790,7 +789,6 @@ set(viewer_HEADER_FILES llfloaterobjectweights.h llfloateropenobject.h llfloateroutbox.h - llfloaterpathfindingbasic.h llfloaterpathfindingcharacters.h llfloaterpathfindingconsole.h llfloaterpathfindinglinksets.h diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index ff4d9ceb93..cb6bdc627f 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -157,16 +157,6 @@ is_running_function="Floater.IsOpen" is_running_parameters="people" /> - - -//--------------------------------------------------------------------------- -// LLFloaterPathfindingBasic -//--------------------------------------------------------------------------- - -BOOL LLFloaterPathfindingBasic::postBuild() -{ - mStatusText = findChild("status_label"); - llassert(mStatusText != NULL); - - mUnfreezeLabel = findChild("unfreeze_label"); - llassert(mUnfreezeLabel != NULL); - - mUnfreezeButton = findChild("enter_unfrozen_mode"); - llassert(mUnfreezeButton != NULL); - mUnfreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingBasic::onUnfreezeClicked, this)); - - mFreezeLabel = findChild("freeze_label"); - llassert(mFreezeLabel != NULL); - - mFreezeButton = findChild("enter_frozen_mode"); - llassert(mFreezeButton != NULL); - mFreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingBasic::onFreezeClicked, this)); - - return LLFloater::postBuild(); -} - -void LLFloaterPathfindingBasic::onOpen(const LLSD& pKey) -{ - LLFloater::onOpen(pKey); - - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLFloaterPathfindingBasic::onAgentStateCB, this, _1)); - } - setAgentState(LLPathfindingManager::getInstance()->getAgentState()); -} - -void LLFloaterPathfindingBasic::onClose(bool pIsAppQuitting) -{ - if (mAgentStateSlot.connected()) - { - mAgentStateSlot.disconnect(); - } - - LLFloater::onClose(pIsAppQuitting); -} - -LLFloaterPathfindingBasic::LLFloaterPathfindingBasic(const LLSD& pSeed) - : LLFloater(pSeed), - mStatusText(NULL), - mUnfreezeLabel(NULL), - mUnfreezeButton(NULL), - mFreezeLabel(NULL), - mFreezeButton(NULL), - mAgentStateSlot() -{ -} - -LLFloaterPathfindingBasic::~LLFloaterPathfindingBasic() -{ -} - -void LLFloaterPathfindingBasic::onUnfreezeClicked() -{ - mUnfreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateUnfrozen); -} - -void LLFloaterPathfindingBasic::onFreezeClicked() -{ - mUnfreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateFrozen); -} - -void LLFloaterPathfindingBasic::onAgentStateCB(LLPathfindingManager::EAgentState pAgentState) -{ - setAgentState(pAgentState); -} - -void LLFloaterPathfindingBasic::setAgentState(LLPathfindingManager::EAgentState pAgentState) -{ - static const LLColor4 errorColor = LLUIColorTable::instance().getColor("PathfindingErrorColor"); - LLStyle::Params styleParams; - - switch (pAgentState) - { - case LLPathfindingManager::kAgentStateUnknown : - mStatusText->setVisible(TRUE); - mStatusText->setText((LLStringExplicit)getString("status_querying_state"), styleParams); - break; - case LLPathfindingManager::kAgentStateNotEnabled : - mStatusText->setVisible(TRUE); - styleParams.color = errorColor; - mStatusText->setText((LLStringExplicit)getString("status_pathfinding_not_enabled"), styleParams); - break; - case LLPathfindingManager::kAgentStateError : - mStatusText->setVisible(TRUE); - styleParams.color = errorColor; - mStatusText->setText((LLStringExplicit)getString("status_unable_to_change_state"), styleParams); - break; - default : - mStatusText->setVisible(FALSE); - break; - } - - switch (LLPathfindingManager::getInstance()->getLastKnownNonErrorAgentState()) - { - case LLPathfindingManager::kAgentStateUnknown : - case LLPathfindingManager::kAgentStateNotEnabled : - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateFrozen : - mUnfreezeLabel->setEnabled(TRUE); - mUnfreezeButton->setEnabled(TRUE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateUnfrozen : - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(TRUE); - mFreezeButton->setEnabled(TRUE); - break; - default : - llassert(0); - break; - } -} diff --git a/indra/newview/llfloaterpathfindingbasic.h b/indra/newview/llfloaterpathfindingbasic.h deleted file mode 100644 index 286985c022..0000000000 --- a/indra/newview/llfloaterpathfindingbasic.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file llfloaterpathfindingbasic.h - * @author William Todd Stinson - * @brief "Pathfinding basic" floater, allowing for basic freezing and unfreezing of the pathfinding avatar mode. - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLFLOATERPATHFINDINGBASIC_H -#define LL_LLFLOATERPATHFINDINGBASIC_H - -#include "llfloater.h" -#include "llpathfindingmanager.h" - -class LLSD; -class LLTextBase; -class LLButton; - -class LLFloaterPathfindingBasic -: public LLFloater -{ - friend class LLFloaterReg; - -public: - virtual BOOL postBuild(); - virtual void onOpen(const LLSD& pKey); - virtual void onClose(bool pIsAppQuitting); - -protected: - -private: - // Does its own instance management, so clients not allowed - // to allocate or destroy. - LLFloaterPathfindingBasic(const LLSD& pSeed); - virtual ~LLFloaterPathfindingBasic(); - - void onUnfreezeClicked(); - void onFreezeClicked(); - - void onAgentStateCB(LLPathfindingManager::EAgentState pAgentState); - - void setAgentState(LLPathfindingManager::EAgentState pAgentState); - - LLTextBase *mStatusText; - LLTextBase *mUnfreezeLabel; - LLButton *mUnfreezeButton; - LLTextBase *mFreezeLabel; - LLButton *mFreezeButton; - LLPathfindingManager::agent_state_slot_t mAgentStateSlot; -}; - -#endif // LL_LLFLOATERPATHFINDINGBASIC_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 12f802b29a..6b7b67dab9 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -84,7 +84,6 @@ #include "llfloaterobjectweights.h" #include "llfloateropenobject.h" #include "llfloateroutbox.h" -#include "llfloaterpathfindingbasic.h" #include "llfloaterpathfindingcharacters.h" #include "llfloaterpathfindinglinksets.h" #include "llfloaterpathfindingconsole.h" @@ -247,7 +246,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterPayUtil::registerFloater(); - LLFloaterReg::add("pathfinding_basic", "floater_pathfinding_basic.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("pathfinding_characters", "floater_pathfinding_characters.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("pathfinding_linksets", "floater_pathfinding_linksets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("pathfinding_console", "floater_pathfinding_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index d5d58235a4..e5778c3263 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -142,7 +142,6 @@ with the same filename but different name - diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml deleted file mode 100644 index 7af40bbff6..0000000000 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - This region is not enabled for pathfinding. - Unable to change modes successfully. - Checking status ... - - - - Allow object / terrain changes: - -