From 9215c682d23d4b977f289c9700b24f3bf2d20b03 Mon Sep 17 00:00:00 2001
From: prep <prep@lindenlab.com>
Date: Wed, 13 Jun 2012 11:31:38 -0400
Subject: [PATCH] Added a baking button

---
 indra/newview/llpanelnavmeshrebake.cpp         | 18 +++++++++++-------
 indra/newview/llpanelnavmeshrebake.h           |  1 +
 .../default/xui/en/panel_navmesh_rebake.xml    | 13 ++++++++++++-
 3 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/indra/newview/llpanelnavmeshrebake.cpp b/indra/newview/llpanelnavmeshrebake.cpp
index 99b2bf288ce..9281c080597 100644
--- a/indra/newview/llpanelnavmeshrebake.cpp
+++ b/indra/newview/llpanelnavmeshrebake.cpp
@@ -44,7 +44,8 @@
 #include "llpanel.h"
 
 LLPanelNavMeshRebake::LLPanelNavMeshRebake() 
-: mNavMeshRebakeButton(NULL)
+: mNavMeshRebakeButton( NULL )
+, mNavMeshBakingButton( NULL )
 , mAttached(false)
 {
 	// make sure we have the only instance of this class
@@ -87,11 +88,17 @@ void LLPanelNavMeshRebake::clearMode( ESNavMeshRebakeMode mode )
 
 BOOL LLPanelNavMeshRebake::postBuild()
 {
+	//Rebake
 	mNavMeshRebakeButton = getChild<LLButton>("navmesh_btn");
 	mNavMeshRebakeButton->setCommitCallback(boost::bind(&LLPanelNavMeshRebake::onNavMeshRebakeClick, this));
 	mNavMeshRebakeButton->setVisible( TRUE );
 	LLHints::registerHintTarget("navmesh_btn", mNavMeshRebakeButton->getHandle());
-
+	
+	//Baking
+	mNavMeshBakingButton = getChild<LLButton>("navmesh_btn_baking");
+	mNavMeshBakingButton->setCommitCallback(boost::bind(&LLPanelNavMeshRebake::onNavMeshRebakeClick, this));
+	mNavMeshBakingButton->setVisible( FALSE );
+	LLHints::registerHintTarget("navmesh_btn_baking", mNavMeshBakingButton->getHandle());
 	return TRUE;
 }
 
@@ -129,11 +136,7 @@ LLPanelNavMeshRebake* LLPanelNavMeshRebake::getPanel()
 {
 	LLPanelNavMeshRebake* panel = new LLPanelNavMeshRebake();
 	panel->buildFromFile("panel_navmesh_rebake.xml");
-
 	panel->setVisible(FALSE);
-
-	llinfos << "Build LLPanelNavMeshRebake panel" << llendl;
-
 	//prep#panel->updatePosition();
 	return panel;
 }
@@ -141,7 +144,8 @@ LLPanelNavMeshRebake* LLPanelNavMeshRebake::getPanel()
 void LLPanelNavMeshRebake::onNavMeshRebakeClick()
 {
 	setFocus(FALSE); 
-	mNavMeshRebakeButton->setVisible(FALSE); 
+	mNavMeshRebakeButton->setVisible( FALSE ); 
+	mNavMeshBakingButton->setVisible( TRUE ); 
 }
 
 /**
diff --git a/indra/newview/llpanelnavmeshrebake.h b/indra/newview/llpanelnavmeshrebake.h
index 81710a140d8..12a3902d8b7 100644
--- a/indra/newview/llpanelnavmeshrebake.h
+++ b/indra/newview/llpanelnavmeshrebake.h
@@ -65,6 +65,7 @@ class LLPanelNavMeshRebake : public LLPanel
 	//void updatePosition();
 
 	LLButton* mNavMeshRebakeButton;
+	LLButton* mNavMeshBakingButton;
 	
 
 	LLHandle<LLPanel> mOriginalParent;
diff --git a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml
index 302b7afe493..94ca00945bf 100644
--- a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml
+++ b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml
@@ -9,7 +9,7 @@
     <button
      follows="left|bottom"
      height="19"
-     label="NavMeshRebake"
+     label="Rebake NavMesh"
      layout="topleft"
      left="10"
      name="navmesh_btn"
@@ -17,5 +17,16 @@
      top="2"
      visible="false"
      width="113" />
+  <button
+   follows="left|bottom"
+   height="19"
+   label="NavMesh Baking..."
+   layout="topleft"
+   left="10"
+   name="navmesh_btn_baking"
+   tool_tip="NavMesh is baking"
+   top="2"
+   visible="false"
+   width="113" />
 </panel>
 
-- 
GitLab