diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-01-23 17:36:22 -0800 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-01-23 17:36:22 -0800 |
commit | 455899b242478518b181f94823332235950270dd (patch) | |
tree | acac0e1c7d72ca2b0364fab86c1db6000e998e90 /indra | |
parent | d84dd19159b9aeb93c2950935691d8362635b9c3 (diff) |
Adding some initial reporting on the pathfinding console detailing the state of the navmesh download.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_pathfinding_console.xml | 9 |
3 files changed, 25 insertions, 4 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 269bef22fe..7b8ede410c 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -35,6 +35,7 @@ #include "llradiogroup.h"
#include "llsliderctrl.h"
#include "lllineeditor.h"
+#include "lltextbase.h"
#include "lltextvalidate.h"
#include "llnavmeshstation.h"
#include "llviewerregion.h"
@@ -95,6 +96,9 @@ BOOL LLFloaterPathfindingConsole::postBuild() llassert(mCharacterTypeRadioGroup != NULL);
mCharacterTypeRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterTypeSwitch, this));
+ mPathfindingStatus = findChild<LLTextBase>("pathfinding_status");
+ llassert(mPathfindingStatus != NULL);
+
mTerrainMaterialA = findChild<LLLineEditor>("terrain_material_a");
llassert(mTerrainMaterialA != NULL);
mTerrainMaterialA->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTerrainMaterialASet, this));
@@ -313,6 +317,7 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mPathSelectionRadioGroup(NULL),
mCharacterWidthSlider(NULL),
mCharacterTypeRadioGroup(NULL),
+ mPathfindingStatus(NULL),
mTerrainMaterialA(NULL),
mTerrainMaterialB(NULL),
mTerrainMaterialC(NULL),
@@ -339,7 +344,11 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) //prep# end test
if ( LLPathingLib::getInstance() == NULL )
{
- llinfos<<"No implementation of pathing library."<<llendl;
+ std::string str = getString("navmesh_library_not_implemented");
+ LLStyle::Params styleParams;
+ styleParams.color = LLUIColorTable::instance().getColor("DrYellow");
+ mPathfindingStatus->setText((LLStringExplicit)str, styleParams);
+ llwarns <<"Errror: cannout find pathing library implementation."<<llendl;
}
else
{
@@ -348,12 +357,17 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) std::string url = gAgent.getRegion()->getCapability( capability );
if ( !url.empty() )
{
- llinfos<<"Region has required caps of type ["<<capability<<"]"<<llendl;
+ std::string str = getString("navmesh_fetch_inprogress");
+ mPathfindingStatus->setText((LLStringExplicit)str);
LLNavMeshStation::getInstance()->setNavMeshDownloadURL( url );
LLNavMeshStation::getInstance()->downloadNavMeshSrc( mNavMeshDownloadObserver.getObserverHandle() );
}
else
{
+ std::string str = getString("navmesh_region_not_enabled");
+ LLStyle::Params styleParams;
+ styleParams.color = LLUIColorTable::instance().getColor("DrYellow");
+ mPathfindingStatus->setText((LLStringExplicit)str, styleParams);
llinfos<<"Region has does not required caps of type ["<<capability<<"]"<<llendl;
}
}
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index c01ae286eb..ffa1efd349 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -37,6 +37,7 @@ class LLSD; class LLRadioGroup;
class LLSliderCtrl;
class LLLineEditor;
+class LLTextBase;
class LLFloaterPathfindingConsole
: public LLFloater
@@ -131,6 +132,7 @@ private: LLRadioGroup *mPathSelectionRadioGroup;
LLSliderCtrl *mCharacterWidthSlider;
LLRadioGroup *mCharacterTypeRadioGroup;
+ LLTextBase *mPathfindingStatus;
LLLineEditor *mTerrainMaterialA;
LLLineEditor *mTerrainMaterialB;
LLLineEditor *mTerrainMaterialC;
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml index 5716ec30b7..f9730e2ece 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -11,6 +11,11 @@ single_instance="true" title="Pathfinding" width="833"> + <floater.string name="navmesh_fetch_initial"></floater.string> + <floater.string name="navmesh_fetch_inprogress">Downloading the navmesh ...</floater.string> + <floater.string name="navmesh_fetch_complete">Navmesh received.</floater.string> + <floater.string name="navmesh_region_not_enabled">Pathfinding is not enabled for this region</floater.string> + <floater.string name="navmesh_library_not_implemented">Cannot find pathing library implementation</floater.string> <text height="13" word_wrap="true" @@ -240,14 +245,14 @@ to see the path between them. word_wrap="true" use_ellipses="false" type="string" - text_color="DrYellow" + text_color="LabelTextColor" length="1" follows="left|top" layout="topleft" left="240" + name="pathfinding_status" top_pad="10" width="208"> - Result: No path found. </text> <view_border bevel_style="none" |