summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2011-12-19 16:36:00 -0800
committerTodd Stinson <stinson@lindenlab.com>2011-12-19 16:36:00 -0800
commit9897c4de69c57ddeae6b94a857e532c0552865cf (patch)
tree33161afdc325f9da1bb87abe6bc2e3022349ee74
parent101a674c73ad3007f9a40fc4593df1d0eaa4fd99 (diff)
Stubbing out functionality for catching the character width slider changes.
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp18
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h6
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_console.xml7
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<LLSliderCtrl>("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
</text>
<slider
- control_name="DebugBeaconLineWidth"
decimal_digits="1"
height="14"
- increment="0.01"
- initial_value="0"
+ increment="0.1"
layout="topleft"
max_val="2"
min_val="0.2"
- name="beacon_width"
+ name="character_width"
top_pad="7"
+ value="1"
width="145" />
<text
height="14"