summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp35
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml13
3 files changed, 49 insertions, 2 deletions
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index ae78004044..aa0c78527d 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -40,6 +40,7 @@
#include "llscrolllistitem.h"
#include "llscrolllistctrl.h"
#include "llcombobox.h"
+#include "llcheckboxctrl.h"
#include "llbutton.h"
#include "llresmgr.h"
#include "llviewerregion.h"
@@ -146,6 +147,9 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
llassert(mSelectNoneButton != NULL);
mSelectNoneButton->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onSelectNoneLinksetsClicked, this));
+ mShowBeaconCheckBox = findChild<LLCheckBoxCtrl>("show_beacon");
+ llassert(mShowBeaconCheckBox != NULL);
+
mTakeButton = findChild<LLButton>("take_linksets");
llassert(mTakeButton != NULL);
mTakeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onTakeClicked, this));
@@ -244,6 +248,37 @@ void LLFloaterPathfindingLinksets::onClose(bool app_quitting)
}
}
+void LLFloaterPathfindingLinksets::draw()
+{
+ if (mShowBeaconCheckBox->get())
+ {
+ std::vector<LLScrollListItem*> selectedItems = mLinksetsScrollList->getAllSelected();
+ if (!selectedItems.empty())
+ {
+ int numSelectedItems = selectedItems.size();
+
+ std::vector<LLViewerObject *> viewerObjects;
+ viewerObjects.reserve(numSelectedItems);
+
+ for (std::vector<LLScrollListItem*>::const_iterator selectedItemIter = selectedItems.begin();
+ selectedItemIter != selectedItems.end(); ++selectedItemIter)
+ {
+ const LLScrollListItem *selectedItem = *selectedItemIter;
+
+ const std::string &objectName = selectedItem->getColumn(0)->getValue().asString();
+
+ LLViewerObject *viewerObject = gObjectList.findObject(selectedItem->getUUID());
+ if (viewerObject != NULL)
+ {
+ gObjectList.addDebugBeacon(viewerObject->getPositionAgent(), objectName, LLColor4(0.f, 0.f, 1.f, 0.8f), LLColor4(1.f, 1.f, 1.f, 1.f), 6);
+ }
+ }
+ }
+ }
+
+ LLFloater::draw();
+}
+
void LLFloaterPathfindingLinksets::openLinksetsEditor()
{
LLFloaterReg::toggleInstanceOrBringToFront("pathfinding_linksets");
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index ca7016e73f..c47ad878cc 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -40,6 +40,7 @@ class LLTextBase;
class LLScrollListCtrl;
class LLLineEditor;
class LLComboBox;
+class LLCheckBoxCtrl;
class LLButton;
class LLFloaterPathfindingLinksets
@@ -69,6 +70,7 @@ public:
virtual BOOL postBuild();
virtual void onOpen(const LLSD& pKey);
virtual void onClose(bool app_quitting);
+ virtual void draw();
static void openLinksetsEditor();
@@ -87,6 +89,7 @@ private:
LLButton *mRefreshListButton;
LLButton *mSelectAllButton;
LLButton *mSelectNoneButton;
+ LLCheckBoxCtrl *mShowBeaconCheckBox;
LLButton *mTakeButton;
LLButton *mTakeCopyButton;
LLButton *mReturnButton;
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
index badade9661..60d547c5f4 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
@@ -276,16 +276,25 @@
follows="left|bottom|right"
layout="topleft"
top_pad="8"
- width="912">
+ width="580">
Actions on selected linksets (If a linkset is removed from the world, its attributes will be lost):
</text>
+ <check_box
+ height="19"
+ follows="left|bottom"
+ label="Show beacon"
+ layout="topleft"
+ name="show_beacon"
+ left_pad="0"
+ top_pad="-16"
+ width="90" />
<button
follows="left|bottom"
height="21"
label="Take"
layout="topleft"
name="take_linksets"
- top_pad="12"
+ top_pad="9"
left="18"
width="95"/>
<button