From a818cd4f7336ed9b33dacd91fcaf5239a8be813d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 26 Jun 2012 18:22:17 -0700 Subject: Renaming the rebake navmesh panel class. --- indra/newview/llpanelpathfindingrebakenavmesh.h | 96 +++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 indra/newview/llpanelpathfindingrebakenavmesh.h (limited to 'indra/newview/llpanelpathfindingrebakenavmesh.h') diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.h b/indra/newview/llpanelpathfindingrebakenavmesh.h new file mode 100644 index 0000000000..f81c030c35 --- /dev/null +++ b/indra/newview/llpanelpathfindingrebakenavmesh.h @@ -0,0 +1,96 @@ +/** +* @file llpanelpathfindingrebakenavmesh.h +* @brief Header file for llpanelpathfindingrebakenavmesh +* @author Prep@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, 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_LLPANELPATHFINDINGREBAKENAVMESH_H +#define LL_LLPANELPATHFINDINGREBAKENAVMESH_H + +#include +#include + +#include "llhandle.h" +#include "llpanel.h" +#include "llpathfindingmanager.h" +#include "llpathfindingnavmesh.h" + +class LLButton; +class LLPathfindingNavMeshStatus; +class LLView; + +class LLPanelPathfindingRebakeNavmesh : public LLPanel +{ + + LOG_CLASS(LLPanelPathfindingRebakeNavmesh); + +public: + static LLPanelPathfindingRebakeNavmesh* getInstance(); + + virtual BOOL postBuild(); + + virtual void draw(); + virtual BOOL handleToolTip( S32 x, S32 y, MASK mask ); + +protected: + +private: + typedef enum + { + kRebakeNavMesh_Available, + kRebakeNavMesh_RequestSent, + kRebakeNavMesh_NotAvailable, + kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable + } ERebakeNavMeshMode; + + LLPanelPathfindingRebakeNavmesh(); + virtual ~LLPanelPathfindingRebakeNavmesh(); + + static LLPanelPathfindingRebakeNavmesh* getPanel(); + + void setMode(ERebakeNavMeshMode pRebakeNavMeshMode); + + void onNavMeshRebakeClick(); + + void handleAgentState(BOOL pCanRebakeRegion); + void handleRebakeNavMeshResponse(bool pResponseStatus); + void handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus); + void handleRegionBoundaryCrossed(); + + void createNavMeshStatusListenerForCurrentRegion(); + + bool doDraw() const; + void updatePosition(); + + BOOL mCanRebakeRegion; + ERebakeNavMeshMode mRebakeNavMeshMode; + + LLButton* mNavMeshRebakeButton; + LLButton* mNavMeshBakingButton; + + LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot; + boost::signals2::connection mRegionCrossingSlot; + LLPathfindingManager::agent_state_slot_t mAgentStateSlot; +}; + +#endif // LL_LLPANELPATHFINDINGREBAKENAVMESH_H -- cgit v1.2.3 From 01545997da201e04731b14eb720765a19470974d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 27 Jun 2012 13:30:01 -0700 Subject: PATH-788: Adding more state information for the rebake region button to capture and display the rebaking states. Also, altering how the stop flying button works so that it does not hide the entire panel. --- indra/newview/llpanelpathfindingrebakenavmesh.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llpanelpathfindingrebakenavmesh.h') diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.h b/indra/newview/llpanelpathfindingrebakenavmesh.h index f81c030c35..a77cddbc50 100644 --- a/indra/newview/llpanelpathfindingrebakenavmesh.h +++ b/indra/newview/llpanelpathfindingrebakenavmesh.h @@ -59,6 +59,7 @@ private: { kRebakeNavMesh_Available, kRebakeNavMesh_RequestSent, + kRebakeNavMesh_InProgress, kRebakeNavMesh_NotAvailable, kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable } ERebakeNavMeshMode; @@ -86,6 +87,7 @@ private: ERebakeNavMeshMode mRebakeNavMeshMode; LLButton* mNavMeshRebakeButton; + LLButton* mNavMeshSendingButton; LLButton* mNavMeshBakingButton; LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot; -- cgit v1.2.3 From 685a672b74550ca0dbf8a816257c84c9c44fd34d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 28 Jun 2012 15:37:55 -0700 Subject: Cleaning up new files in preparation for merge into viewer-release. --- indra/newview/llpanelpathfindingrebakenavmesh.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llpanelpathfindingrebakenavmesh.h') diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.h b/indra/newview/llpanelpathfindingrebakenavmesh.h index a77cddbc50..5fe581ec2f 100644 --- a/indra/newview/llpanelpathfindingrebakenavmesh.h +++ b/indra/newview/llpanelpathfindingrebakenavmesh.h @@ -27,17 +27,14 @@ #ifndef LL_LLPANELPATHFINDINGREBAKENAVMESH_H #define LL_LLPANELPATHFINDINGREBAKENAVMESH_H -#include #include -#include "llhandle.h" #include "llpanel.h" #include "llpathfindingmanager.h" #include "llpathfindingnavmesh.h" class LLButton; class LLPathfindingNavMeshStatus; -class LLView; class LLPanelPathfindingRebakeNavmesh : public LLPanel { -- cgit v1.2.3 From d7f372d6bee42f405e0e3772ff8c30f4c1bf6612 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 9 Jul 2012 13:29:50 -0700 Subject: BUGFIX: Correcting a crash issue that was caused by the rebake navmesh callback handler unexpectedly changing the navmesh state. --- indra/newview/llpanelpathfindingrebakenavmesh.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelpathfindingrebakenavmesh.h') diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.h b/indra/newview/llpanelpathfindingrebakenavmesh.h index 5fe581ec2f..48764f2aa7 100644 --- a/indra/newview/llpanelpathfindingrebakenavmesh.h +++ b/indra/newview/llpanelpathfindingrebakenavmesh.h @@ -66,7 +66,8 @@ private: static LLPanelPathfindingRebakeNavmesh* getPanel(); - void setMode(ERebakeNavMeshMode pRebakeNavMeshMode); + void setMode(ERebakeNavMeshMode pRebakeNavMeshMode); + ERebakeNavMeshMode getMode() const; void onNavMeshRebakeClick(); -- cgit v1.2.3