aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r--linden/indra/newview/llviewermenu.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index c4cbf84..b7f4a40 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -1605,6 +1605,31 @@ void label_touch(std::string& label, void*)
1605 } 1605 }
1606} 1606}
1607 1607
1608class LLAttachmentEnableTouch : public view_listener_t
1609{
1610 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1611 {
1612 LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
1613
1614 if (!obj) return false;
1615 if (!obj->isAttachment()) return false;
1616
1617 bool new_value = obj && obj->flagHandleTouch();
1618 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
1619 LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
1620
1621 if (node && node->mValid && !node->mTouchName.empty())
1622 {
1623 gMenuHolder->childSetText("Attachment Touch", node->mTouchName);
1624 }
1625 else
1626 {
1627 gMenuHolder->childSetText("Attachment Touch", userdata["data"].asString());
1628 }
1629 return true;
1630 }
1631};
1632
1608bool handle_object_open() 1633bool handle_object_open()
1609{ 1634{
1610 LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); 1635 LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
@@ -9822,6 +9847,7 @@ void initialize_menus()
9822 9847
9823 addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop"); 9848 addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop");
9824 addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach"); 9849 addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach");
9850 addMenu(new LLAttachmentEnableTouch(), "Attachment.EnableTouch");
9825 9851
9826 // Land pie menu 9852 // Land pie menu
9827 addMenu(new LLLandBuild(), "Land.Build"); 9853 addMenu(new LLLandBuild(), "Land.Build");