aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llviewermenu.cpp26
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml4
2 files changed, 28 insertions, 2 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");
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
index d16c22c..a3e2bba 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
@@ -6,9 +6,9 @@
6 <menu_item_call enabled="true" label="Groups..." name="Groups..."> 6 <menu_item_call enabled="true" label="Groups..." name="Groups...">
7 <on_click function="ShowAgentGroups" userdata="agent" /> 7 <on_click function="ShowAgentGroups" userdata="agent" />
8 </menu_item_call> 8 </menu_item_call>
9 <menu_item_call enabled="false" label="Touch" mouse_opaque="true" name="Object Touch"> 9 <menu_item_call enabled="false" label="Touch" mouse_opaque="true" name="Attachment Touch">
10 <on_click function="Object.Touch" /> 10 <on_click function="Object.Touch" />
11 <on_enable function="Object.EnableTouch" userdata="Touch" /> 11 <on_enable function="Attachment.EnableTouch" userdata="Touch" />
12 </menu_item_call> 12 </menu_item_call>
13 <menu_item_call enabled="true" label="Stand Up" name="Stand Up"> 13 <menu_item_call enabled="true" label="Stand Up" name="Stand Up">
14 <on_click function="Self.StandUp" userdata="" /> 14 <on_click function="Self.StandUp" userdata="" />