diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 7b8ede410c2c3b0620590aa6f0cfd90d1e25509f..63b863937e5b7c2118dfc9cdcb6239a8bbfb1cd5 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -307,6 +307,18 @@ void LLFloaterPathfindingConsole::setTerrainMaterialD(F32 pTerrainMaterial) mTerrainMaterialD->setValue(LLSD(pTerrainMaterial)); } +void LLFloaterPathfindingConsole::setHasNavMeshReceived() +{ + std::string str = getString("navmesh_fetch_complete_available"); + mPathfindingStatus->setText((LLStringExplicit)str); +} + +void LLFloaterPathfindingConsole::setHasNoNavMesh() +{ + std::string str = getString("navmesh_fetch_complete_none"); + mPathfindingStatus->setText((LLStringExplicit)str); +} + LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) : LLFloater(pSeed), mShowNavMeshCheckBox(NULL), @@ -324,6 +336,7 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mTerrainMaterialD(NULL), mNavMeshDownloadObserver() { + mNavMeshDownloadObserver.setPathfindingConsole(this); } LLFloaterPathfindingConsole::~LLFloaterPathfindingConsole() diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index ffa1efd3497971ed97284b446c45239e252e9f9e..7d8369c806524da3bef0cbed05ea7b4b77629faa 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -98,6 +98,9 @@ class LLFloaterPathfindingConsole BOOL getShowPathToggle() const {return mShowPathCheckBox->get(); } + void setHasNavMeshReceived(); + void setHasNoNavMesh(); + protected: private: diff --git a/indra/newview/llnavmeshstation.cpp b/indra/newview/llnavmeshstation.cpp index bb08f00f40a4a9341ddceed26499b4af66d2afad..48f54649f8f7fe069ee16c5e495bcee42f9fdd00 100644 --- a/indra/newview/llnavmeshstation.cpp +++ b/indra/newview/llnavmeshstation.cpp @@ -31,10 +31,13 @@ #include "llagent.h" #include "llviewerregion.h" #include "llsdutil.h" +#include "llfloaterpathfindingconsole.h" + //=============================================================================== LLNavMeshStation::LLNavMeshStation() { } + //=============================================================================== class LLNavMeshUploadResponder : public LLCurl::Responder { @@ -98,7 +101,6 @@ class LLNavMeshDownloadResponder : public LLCurl::Responder void result( const LLSD& content ) { - llinfos<<"Content received"<<llendl; //TODO# some sanity checking if ( content.has("error") ) { @@ -115,10 +117,12 @@ class LLNavMeshDownloadResponder : public LLCurl::Responder { const LLSD::Binary& stuff = content["navmesh_data"].asBinary(); LLPathingLib::getInstance()->extractNavMeshSrcFromLLSD( stuff ); + pObserver->getPathfindingConsole()->setHasNavMeshReceived(); } else { llwarns<<"no mesh data "<<llendl; + pObserver->getPathfindingConsole()->setHasNoNavMesh(); } } } diff --git a/indra/newview/llnavmeshstation.h b/indra/newview/llnavmeshstation.h index ce884c146651458e52f838a7db83aa81e652b631..566f6d2d8d9af9c6d09dc2fdb2884a81be350af8 100644 --- a/indra/newview/llnavmeshstation.h +++ b/indra/newview/llnavmeshstation.h @@ -31,6 +31,7 @@ #include "llhandle.h" //=============================================================================== class LLCurlRequest; +class LLFloaterPathfindingConsole; //=============================================================================== class LLNavMeshObserver { @@ -51,14 +52,19 @@ class LLNavMeshDownloadObserver { public: //Ctor - LLNavMeshDownloadObserver() { mObserverHandle.bind(this); } + LLNavMeshDownloadObserver() + : mPathfindingConsole(NULL) + { mObserverHandle.bind(this); } //Dtor virtual ~LLNavMeshDownloadObserver() {} //Accessor for the observers handle const LLHandle<LLNavMeshDownloadObserver>& getObserverHandle() const { return mObserverHandle; } + LLFloaterPathfindingConsole *getPathfindingConsole() {return mPathfindingConsole;} + void setPathfindingConsole(LLFloaterPathfindingConsole *pPathfindingConsole) {mPathfindingConsole = pPathfindingConsole;} protected: LLRootHandle<LLNavMeshDownloadObserver> mObserverHandle; + LLFloaterPathfindingConsole *mPathfindingConsole; }; //=============================================================================== class LLNavMeshStation : public LLSingleton<LLNavMeshStation> 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 f9730e2ece4f5cfd32143db332e5f8e6fcf1b72c..7b751d525f53759089b94097f0cf062ad720c8f6 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -13,9 +13,10 @@ 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> + <floater.string name="navmesh_fetch_complete_available">Navmesh received.</floater.string> + <floater.string name="navmesh_fetch_complete_none">No navmesh for region.</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"