From 9897c4de69c57ddeae6b94a857e532c0552865cf Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 19 Dec 2011 16:36:00 -0800 Subject: Stubbing out functionality for catching the character width slider changes. --- indra/newview/llfloaterpathfindingconsole.cpp | 18 ++++++++++++++++++ indra/newview/llfloaterpathfindingconsole.h | 6 +++++- .../default/xui/en/floater_pathfinding_console.xml | 7 +++---- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 5fa9d6f3a4..f045eba19b 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -34,6 +34,7 @@ #include "llbutton.h" #include "llcheckboxctrl.h" #include "llradiogroup.h" +#include "llsliderctrl.h" #include "llnavmeshstation.h" #include "llviewerregion.h" @@ -71,6 +72,10 @@ BOOL LLFloaterPathfindingConsole::postBuild() llassert(mPathSelectionRadioGroup != NULL); mPathSelectionRadioGroup ->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onPathSelectionSwitch, this)); + mCharacterWidthSlider = findChild("character_width"); + llassert(mCharacterWidthSlider != NULL); + mCharacterWidthSlider->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterWidthSet, this)); + return LLFloater::postBuild(); } @@ -82,6 +87,7 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mShowWaterPlaneCheckBox(NULL), mRegionOverlayDisplayRadioGroup(NULL), mPathSelectionRadioGroup(NULL), + mCharacterWidthSlider(NULL), mNavmeshDownloadObserver() { } @@ -219,6 +225,13 @@ void LLFloaterPathfindingConsole::onPathSelectionSwitch() } } +void LLFloaterPathfindingConsole::onCharacterWidthSet() +{ + F32 characterWidth = getCharacterWidth(); + llwarns << "functionality has not yet been implemented to set " << mCharacterWidthSlider->getName() + << " to the value (" << characterWidth << ")" << llendl; +} + void LLFloaterPathfindingConsole::onViewEditLinksetClicked() { LLFloaterPathfindingLinksets::openLinksetsEditor(); @@ -262,3 +275,8 @@ LLFloaterPathfindingConsole::EPathSelectionState LLFloaterPathfindingConsole::ge return pathSelectionState; } + +F32 LLFloaterPathfindingConsole::getCharacterWidth() const +{ + return mCharacterWidthSlider->getValueF32(); +} \ No newline at end of file diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index f5af94fa5a..e21d69c1eb 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -34,6 +34,7 @@ class LLSD; class LLCheckBoxCtrl; class LLRadioGroup; +class LLSliderCtrl; class LLFloaterPathfindingConsole : public LLFloater @@ -72,10 +73,12 @@ private: void onShowWaterPlaneToggle(); void onRegionOverlayDisplaySwitch(); void onPathSelectionSwitch(); + void onCharacterWidthSet(); void onViewEditLinksetClicked(); ERegionOverlayDisplay getRegionOverlayDisplay() const; - EPathSelectionState getPathSelectionState() const; + EPathSelectionState getPathSelectionState() const; + F32 getCharacterWidth() const; LLCheckBoxCtrl *mShowNavmeshCheckBox; LLCheckBoxCtrl *mShowExcludeVolumesCheckBox; @@ -83,6 +86,7 @@ private: LLCheckBoxCtrl *mShowWaterPlaneCheckBox; LLRadioGroup *mRegionOverlayDisplayRadioGroup; LLRadioGroup *mPathSelectionRadioGroup; + LLSliderCtrl *mCharacterWidthSlider; LLNavMeshDownloadObserver mNavmeshDownloadObserver; }; 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 501451999d..444347808b 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -154,16 +154,15 @@ to see the path between them. Character width