summaryrefslogtreecommitdiff
path: root/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-10-16 18:45:37 -0700
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-10-16 18:45:37 -0700
commit8dbd1f5f48d5af605f73558091b2bab554ba49c2 (patch)
treef1eb8a2701db91b7273025481121eccb2b038488 /indra/newview/llmenuoptionpathfindingrebakenavmesh.h
parente4b98970f4d0cf3fd9979868e69e0ccc20a7de37 (diff)
MAINT-1737: Adding a menu option to the Pathfinding menu to allow rebuilding of the region's navmesh.
Diffstat (limited to 'indra/newview/llmenuoptionpathfindingrebakenavmesh.h')
-rw-r--r--indra/newview/llmenuoptionpathfindingrebakenavmesh.h49
1 files changed, 19 insertions, 30 deletions
diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.h b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
index e41ae9cae0..7b1d2873ba 100644
--- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
+++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
@@ -24,34 +24,22 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-#ifndef LL_LLPANELPATHFINDINGREBAKENAVMESH_H
-#define LL_LLPANELPATHFINDINGREBAKENAVMESH_H
+#ifndef LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H
+#define LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H
#include <boost/signals2.hpp>
-#include "llpanel.h"
#include "llpathfindingmanager.h"
#include "llpathfindingnavmesh.h"
+#include "llsingleton.h"
-class LLButton;
class LLPathfindingNavMeshStatus;
-class LLPanelPathfindingRebakeNavmesh : public LLPanel
+class LLMenuOptionPathfindingRebakeNavmesh : public LLSingleton<LLMenuOptionPathfindingRebakeNavmesh>
{
-
- LOG_CLASS(LLPanelPathfindingRebakeNavmesh);
+ LOG_CLASS(LLMenuOptionPathfindingRebakeNavmesh);
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,
@@ -61,15 +49,21 @@ private:
kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable
} ERebakeNavMeshMode;
- LLPanelPathfindingRebakeNavmesh();
- virtual ~LLPanelPathfindingRebakeNavmesh();
+ LLMenuOptionPathfindingRebakeNavmesh();
+ virtual ~LLMenuOptionPathfindingRebakeNavmesh();
- static LLPanelPathfindingRebakeNavmesh* getPanel();
+ void initialize();
+ void quit();
- void setMode(ERebakeNavMeshMode pRebakeNavMeshMode);
+ bool canRebakeRegion() const;
ERebakeNavMeshMode getMode() const;
- void onNavMeshRebakeClick();
+ void sendRequestRebakeNavmesh();
+
+protected:
+
+private:
+ void setMode(ERebakeNavMeshMode pRebakeNavMeshMode);
void handleAgentState(BOOL pCanRebakeRegion);
void handleRebakeNavMeshResponse(bool pResponseStatus);
@@ -78,19 +72,14 @@ private:
void createNavMeshStatusListenerForCurrentRegion();
- bool doDraw() const;
- void updatePosition();
+ bool mIsInitialized;
- BOOL mCanRebakeRegion;
+ bool mCanRebakeRegion;
ERebakeNavMeshMode mRebakeNavMeshMode;
- LLButton* mNavMeshRebakeButton;
- LLButton* mNavMeshSendingButton;
- LLButton* mNavMeshBakingButton;
-
LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
boost::signals2::connection mRegionCrossingSlot;
LLPathfindingManager::agent_state_slot_t mAgentStateSlot;
};
-#endif // LL_LLPANELPATHFINDINGREBAKENAVMESH_H
+#endif // LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H