summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2011-12-16 10:15:43 -0800
committerTodd Stinson <stinson@lindenlab.com>2011-12-16 10:15:43 -0800
commitdcd945fc74b57313da96e97f7de4ee0b6b81ef70 (patch)
tree9db01c431537e157c4068db601c555a1e31919be /indra/newview
parentb793c3aa1986d352cb90994d6d283eab55a7a3ba (diff)
Adding functionality for the linksets button on the console to open the linksets floater.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp12
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h2
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp8
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h7
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_console.xml2
5 files changed, 28 insertions, 3 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 4235228c08..a2182a2551 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -27,8 +27,10 @@
#include "llviewerprecompiledheaders.h"
#include "llfloaterpathfindingconsole.h"
+#include "llfloaterpathfindinglinksets.h"
#include "llsd.h"
+#include "llbutton.h"
//---------------------------------------------------------------------------
// LLFloaterPathfindingConsole
@@ -36,6 +38,11 @@
BOOL LLFloaterPathfindingConsole::postBuild()
{
+ LLButton *linksetBtn = getChild<LLButton>("view_and_edit_linksets");
+ llassert(linksetBtn != NULL);
+
+ linksetBtn->setClickedCallback(boost::bind(&LLFloaterPathfindingConsole::onViewEditLinksetClicked, this));
+
return LLFloater::postBuild();
}
@@ -47,3 +54,8 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& seed)
LLFloaterPathfindingConsole::~LLFloaterPathfindingConsole()
{
}
+
+void LLFloaterPathfindingConsole::onViewEditLinksetClicked()
+{
+ LLFloaterPathfindingLinksets::openLinksetsEditor();
+}
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h
index 4ea9691f96..4c61044b1d 100644
--- a/indra/newview/llfloaterpathfindingconsole.h
+++ b/indra/newview/llfloaterpathfindingconsole.h
@@ -48,7 +48,7 @@ private:
LLFloaterPathfindingConsole(const LLSD& seed);
virtual ~LLFloaterPathfindingConsole();
- void onVisibilityChange(const LLSD& visible);
+ void onViewEditLinksetClicked();
};
#endif // LL_LLFLOATERPATHFINDINGCONSOLE_H
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index fcbc3e7cad..4f98834dde 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -27,8 +27,9 @@
#include "llviewerprecompiledheaders.h"
#include "llfloaterpathfindinglinksets.h"
-
#include "llsd.h"
+#include "llfloater.h"
+#include "llfloaterreg.h"
//---------------------------------------------------------------------------
// LLFloaterPathfindingLinksets
@@ -39,6 +40,11 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
return LLFloater::postBuild();
}
+void LLFloaterPathfindingLinksets::openLinksetsEditor()
+{
+ LLFloaterReg::toggleInstanceOrBringToFront("pathfinding_linksets");
+}
+
LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& seed)
: LLFloater(seed)
{
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index f5d10915a5..de32951462 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -40,6 +40,13 @@ class LLFloaterPathfindingLinksets
public:
virtual BOOL postBuild();
+ static void openLinksetsEditor();
+
+ struct Params : public LLInitParam::Block<Params, LLFloater::Params>
+ {
+ Params();
+ };
+
protected:
private:
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 39ea9495ff..dfb2eca4c8 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
@@ -264,7 +264,7 @@ to see the path between them.
height="21"
label="Linksets..."
layout="topleft"
- name="linksets"
+ name="view_and_edit_linksets"
width="96"/>
<text
height="25"