summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-08-27 18:15:42 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-08-27 18:15:42 +0100
commitc722590d157f15547811bd93854ae1afb34382c3 (patch)
treee546ac3c59af68d9d13d83ba05cc6759aab6e050 /indra
parentad9330025d18a29a2e90b77472a1f1f6e3c165ae (diff)
parent43eb195633ccab69c15a7a0cd9862c84c3dfcfd4 (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagent.cpp5
-rw-r--r--indra/newview/llagent.h2
-rw-r--r--indra/newview/llviewermenu.cpp23
-rw-r--r--indra/newview/skins/default/xui/en/menu_attachment_self.xml13
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_self.xml12
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml10
-rw-r--r--indra/newview/viewer_manifest.py4
7 files changed, 61 insertions, 8 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 37cd289b1b..fe7e883d83 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -827,6 +827,11 @@ LLVector3d LLAgent::getPosGlobalFromAgent(const LLVector3 &pos_agent) const
return pos_agent_d + mAgentOriginGlobal;
}
+void LLAgent::sitDown()
+{
+ setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
+}
+
//-----------------------------------------------------------------------------
// resetAxes()
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 0d95683a98..c643cef78f 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -345,6 +345,8 @@ private:
//--------------------------------------------------------------------
public:
void standUp();
+ /// @brief ground-sit at agent's current position
+ void sitDown();
//--------------------------------------------------------------------
// Busy
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c275068028..daeace0ec5 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3383,8 +3383,21 @@ class LLSelfStandUp : public view_listener_t
bool enable_standup_self()
{
- bool new_value = isAgentAvatarValid() && gAgentAvatarp->isSitting();
- return new_value;
+ return isAgentAvatarValid() && gAgentAvatarp->isSitting();
+}
+
+class LLSelfSitDown : public view_listener_t
+ {
+ bool handleEvent(const LLSD& userdata)
+ {
+ gAgent.sitDown();
+ return true;
+ }
+ };
+
+bool enable_sitdown_self()
+{
+ return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying();
}
// Used from the login screen to aid in UI work on side tray
@@ -8100,11 +8113,13 @@ void initialize_menus()
// Admin top level
view_listener_t::addMenu(new LLAdminOnSaveState(), "Admin.OnSaveState");
- // Self pie menu
+ // Self context menu
view_listener_t::addMenu(new LLSelfStandUp(), "Self.StandUp");
+ enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self));
+ view_listener_t::addMenu(new LLSelfSitDown(), "Self.SitDown");
+ enable.add("Self.EnableSitDown", boost::bind(&enable_sitdown_self));
view_listener_t::addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments");
- enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self));
view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
// we don't use boost::bind directly to delay side tray construction
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index e2348375d5..84e81397be 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -23,7 +23,7 @@
<menu_item_call.on_enable
function="Self.EnableStandUp" />
</menu_item_call-->
- <menu_item_call
+ <menu_item_call
enabled="false"
label="Edit"
layout="topleft"
@@ -46,6 +46,17 @@
<menu_item_separator
layout="topleft" />
+ <menu_item_call
+ label="Sit Down"
+ layout="topleft"
+ name="Sit Down Here">
+ <menu_item_call.on_click
+ function="Self.SitDown"
+ parameter="" />
+ <menu_item_call.on_enable
+ function="Self.EnableSitDown" />
+ </menu_item_call>
+
<menu_item_call
label="Stand Up"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index d5b993152a..9059745f46 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -2,7 +2,17 @@
<context_menu
layout="topleft"
name="Self Pie">
- <menu_item_call
+ <menu_item_call
+ label="Sit Down"
+ layout="topleft"
+ name="Sit Down Here">
+ <menu_item_call.on_click
+ function="Self.SitDown"
+ parameter="" />
+ <menu_item_call.on_enable
+ function="Self.EnableSitDown" />
+ </menu_item_call>
+ <menu_item_call
label="Stand Up"
layout="topleft"
name="Stand Up">
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
index ea18e02ca1..30c2cde552 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
@@ -6,6 +6,16 @@
visible="false"
name="Gear Menu">
<menu_item_call
+ label="Sit Down"
+ enabled="true"
+ name="sit_down_here">
+ <menu_item_call.on_click
+ function="Self.SitDown"
+ parameter="" />
+ <menu_item_call.on_visible
+ function="Self.EnableSitDown" />
+ </menu_item_call>
+ <menu_item_call
label="Stand Up"
enabled="true"
name="stand_up">
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index e963bcc9f7..08ba8c13b1 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -930,10 +930,10 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libopenal.so", "libopenal.so.1")
self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
try:
- self.path("libkdu_v42R.so", "libkdu.so")
+ self.path("libkdu.so")
pass
except:
- print "Skipping libkdu_v42R.so - not found"
+ print "Skipping libkdu.so - not found"
pass
try:
self.path("libfmod-3.75.so")