aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:07 -0500
committerJacek Antonelli2008-08-15 23:45:07 -0500
commit8465910c79b8e746e04fd581cca2d60399e569b9 (patch)
treef43fec3e83c46e0d6190dca923d6fb268b52ffdd /linden/indra/newview/llviewermenu.cpp
parentSecond Life viewer sources 1.18.2.1 (diff)
downloadmeta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.zip
meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.gz
meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.bz2
meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.xz
Second Life viewer sources 1.18.3.2-RC
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r--linden/indra/newview/llviewermenu.cpp48
1 files changed, 44 insertions, 4 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 4ac1da4..0d7a2cd 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -40,6 +40,7 @@
40#include "indra_constants.h" 40#include "indra_constants.h"
41#include "llassetstorage.h" 41#include "llassetstorage.h"
42#include "llchat.h" 42#include "llchat.h"
43#include "llfeaturemanager.h"
43#include "llfocusmgr.h" 44#include "llfocusmgr.h"
44#include "llfontgl.h" 45#include "llfontgl.h"
45#include "llinstantmessage.h" 46#include "llinstantmessage.h"
@@ -98,6 +99,7 @@
98#include "llfloatergesture.h" 99#include "llfloatergesture.h"
99#include "llfloatergodtools.h" 100#include "llfloatergodtools.h"
100#include "llfloatergroupinfo.h" 101#include "llfloatergroupinfo.h"
102#include "llfloatergroupinvite.h"
101#include "llfloatergroups.h" 103#include "llfloatergroups.h"
102#include "llfloaterhtml.h" 104#include "llfloaterhtml.h"
103#include "llfloaterhtmlhelp.h" 105#include "llfloaterhtmlhelp.h"
@@ -411,7 +413,7 @@ void toggle_debug_menus(void*);
411void toggle_map( void* user_data ); 413void toggle_map( void* user_data );
412void export_info_callback(LLAssetInfo *info, void **user_data, S32 result); 414void export_info_callback(LLAssetInfo *info, void **user_data, S32 result);
413void export_data_callback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void **user_data, S32 result); 415void export_data_callback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void **user_data, S32 result);
414void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result); 416void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status);
415BOOL menu_check_build_tool( void* user_data ); 417BOOL menu_check_build_tool( void* user_data );
416void handle_reload_settings(void*); 418void handle_reload_settings(void*);
417void focus_here(void*); 419void focus_here(void*);
@@ -1226,7 +1228,7 @@ void init_debug_rendering_menu(LLMenuGL* menu)
1226 1228
1227 LLMenuItemCheckGL* item; 1229 LLMenuItemCheckGL* item;
1228 item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT); 1230 item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT);
1229 item->setEnabled(gGLManager.mHasOcclusionQuery); 1231 item->setEnabled(gGLManager.mHasOcclusionQuery && gFeatureManagerp->isFeatureAvailable("UseOcclusion"));
1230 menu->append(item); 1232 menu->append(item);
1231 1233
1232 1234
@@ -5100,6 +5102,43 @@ class LLToolsLookAtSelection : public view_listener_t
5100 } 5102 }
5101}; 5103};
5102 5104
5105void callback_invite_to_group(LLUUID group_id, void *user_data)
5106{
5107 std::vector<LLUUID> agent_ids;
5108 agent_ids.push_back(*(LLUUID *)user_data);
5109
5110 LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
5111}
5112
5113void invite_to_group(const LLUUID& dest_id)
5114{
5115 LLViewerObject* dest = gObjectList.findObject(dest_id);
5116 if(dest && dest->isAvatar())
5117 {
5118 LLFloaterGroupPicker* widget;
5119 widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
5120 if (widget)
5121 {
5122 widget->center();
5123 widget->setPowersMask(GP_MEMBER_INVITE);
5124 widget->setSelectCallback(callback_invite_to_group, (void *)&dest_id);
5125 }
5126 }
5127}
5128
5129class LLAvatarInviteToGroup : public view_listener_t
5130{
5131 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
5132 {
5133 LLVOAvatar* avatar = find_avatar_from_object( gViewerWindow->lastObjectHit() );
5134 if(avatar)
5135 {
5136 invite_to_group(avatar->getID());
5137 }
5138 return true;
5139 }
5140};
5141
5103class LLAvatarAddFriend : public view_listener_t 5142class LLAvatarAddFriend : public view_listener_t
5104{ 5143{
5105 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 5144 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -7434,7 +7473,7 @@ class LLViewToggleRenderType : public view_listener_t
7434 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 7473 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7435 { 7474 {
7436 LLString type = userdata.asString(); 7475 LLString type = userdata.asString();
7437 if (type == "particles") 7476 if (type == "hideparticles")
7438 { 7477 {
7439 LLPipeline::toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES); 7478 LLPipeline::toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES);
7440 } 7479 }
@@ -7448,7 +7487,7 @@ class LLViewCheckRenderType : public view_listener_t
7448 { 7487 {
7449 LLString type = userdata["data"].asString(); 7488 LLString type = userdata["data"].asString();
7450 bool new_value = false; 7489 bool new_value = false;
7451 if (type == "particles") 7490 if (type == "hideparticles")
7452 { 7491 {
7453 new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES); 7492 new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES);
7454 } 7493 }
@@ -7750,6 +7789,7 @@ void initialize_menus()
7750 addMenu(new LLAvatarDebug(), "Avatar.Debug"); 7789 addMenu(new LLAvatarDebug(), "Avatar.Debug");
7751 addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug"); 7790 addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
7752 addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug"); 7791 addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug");
7792 addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup");
7753 addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); 7793 addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
7754 addMenu(new LLAvatarEject(), "Avatar.Eject"); 7794 addMenu(new LLAvatarEject(), "Avatar.Eject");
7755 addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); 7795 addMenu(new LLAvatarSendIM(), "Avatar.SendIM");