From 73b8ee092e6f8a450e5bf71c43a0362c4986a005 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sat, 11 Jul 2009 12:25:27 +0200 Subject: Teleport by double clicking into the viewer window. Port and bugfix of cv port of emerald greenlife viewer feature. TODO: find a nice place in prefs to switch off (defaults to on). (cherry picked from commit 86e186e40f6a128abab1c3a44f33520508b37f16) --- linden/indra/newview/llviewermenu.cpp | 51 ++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 21 deletions(-) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 2940bdd..51953b09 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -2106,32 +2106,41 @@ class LLObjectMute : public view_listener_t bool handle_go_to() { - // JAMESDEBUG try simulator autopilot - std::vector strings; - std::string val; LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; - val = llformat("%g", pos.mdV[VX]); - strings.push_back(val); - val = llformat("%g", pos.mdV[VY]); - strings.push_back(val); - val = llformat("%g", pos.mdV[VZ]); - strings.push_back(val); - send_generic_message("autopilot", strings); - - LLViewerParcelMgr::getInstance()->deselectLand(); - - if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) + if (gSavedSettings.getBOOL("DoubleClickTeleport")) { - gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); + LLVector3d hips_offset(0.0f, 0.0f, 1.2f); + gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); + gAgent.teleportViaLocation(pos + hips_offset); } - else + else { - // Snap camera back to behind avatar - gAgent.setFocusOnAvatar(TRUE, ANIMATE); - } + // JAMESDEBUG try simulator autopilot + std::vector strings; + std::string val; + val = llformat("%g", pos.mdV[VX]); + strings.push_back(val); + val = llformat("%g", pos.mdV[VY]); + strings.push_back(val); + val = llformat("%g", pos.mdV[VZ]); + strings.push_back(val); + send_generic_message("autopilot", strings); + + LLViewerParcelMgr::getInstance()->deselectLand(); - // Could be first use - LLFirstUse::useGoTo(); + if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) + { + gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); + } + else + { + // Snap camera back to behind avatar + gAgent.setFocusOnAvatar(TRUE, ANIMATE); + } + + // Could be first use + LLFirstUse::useGoTo(); + } return true; } -- cgit v1.1 From e0450b604383f3a0276097496f1935e1b543ec5e Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 4 Sep 2009 18:53:30 -0700 Subject: Integrated 1.23's tool floater with link/unlink buttons --- linden/indra/newview/llviewermenu.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 51953b09..2e4f3f4 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -5410,7 +5410,6 @@ class LLLandEdit : public view_listener_t LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal ); - gFloaterTools->showMore(TRUE); gFloaterView->bringToFront( gFloaterTools ); // Switch to land edit toolset -- cgit v1.1 From 5ef87f0115db707483699af0a468945f022fcfc6 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 6 Sep 2009 18:33:23 -0700 Subject: Ported sit anywhere feature from Emerald viewer --- linden/indra/newview/llviewermenu.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 51953b09..727f357 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -7556,6 +7556,32 @@ class LLAdvancedCheckHUDInfo : public view_listener_t }; +////////////////////// +// FORCE GROUND SIT // +////////////////////// + +class LLAdvancedToggleSit: public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLChat chat; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + if(!gAgent.getAvatarObject()->mIsSitting) + { + gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); + chat.mText = "Forcing Ground Sit"; + } + else + { + gAgent.setControlFlags(!AGENT_CONTROL_SIT_ON_GROUND); + gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); + chat.mText = "Standing up"; + } + LLFloaterChat::addChat(chat); + return true; + } +}; + /////////////////////// // CLEAR GROUP CACHE // @@ -9572,6 +9598,7 @@ void initialize_menus() addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); addMenu(new LLWorldSetAway(), "World.SetAway"); addMenu(new LLWorldSetBusy(), "World.SetBusy"); + addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); @@ -9720,6 +9747,7 @@ void initialize_menus() addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); + addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); // Advanced > HUD Info addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); -- cgit v1.1 From ad45708178b7e014faad753fab00cd9cd58df5a7 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 6 Sep 2009 20:53:19 -0700 Subject: Ported phantom avatar option from Emerald viewer --- linden/indra/newview/llviewermenu.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 727f357..3be857e 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -7583,6 +7583,36 @@ class LLAdvancedToggleSit: public view_listener_t }; +///////////// +// PHANTOM // +///////////// + +class LLAdvancedTogglePhantom: public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLAgent::togglePhantom(); + BOOL ph = LLAgent::getPhantom(); + LLChat chat; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + chat.mText = llformat("%s%s","Phantom ",(ph ? "On" : "Off")); + LLFloaterChat::addChat(chat); + //gMenuHolder->findControl(userdata["control"].asString())->setValue(ph); + return true; + } + +}; + +class LLAdvancedCheckPhantom: public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAgent::getPhantom()); + return true; + } +}; + + /////////////////////// // CLEAR GROUP CACHE // /////////////////////// @@ -9599,6 +9629,8 @@ void initialize_menus() addMenu(new LLWorldSetAway(), "World.SetAway"); addMenu(new LLWorldSetBusy(), "World.SetBusy"); addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); + addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom"); + addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom"); addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); -- cgit v1.1 From 18e1aead704e0605ceefb9e47db9acdb4c40928e Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 6 Sep 2009 21:51:06 -0700 Subject: Added Emerald viewer's animation list --- linden/indra/newview/llviewermenu.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 3be857e..b937894 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -210,6 +210,8 @@ #include "lltexlayer.h" +#include "jcfloater_animation_list.h" + void init_client_menu(LLMenuGL* menu); void init_server_menu(LLMenuGL* menu); @@ -5218,6 +5220,10 @@ class LLShowFloater : public view_listener_t { LLFloaterActiveSpeakers::toggleInstance(LLSD()); } + else if (floater_name == "animation list") + { + JCFloaterAnimList::toggleInstance(LLSD()); + } else if (floater_name == "inworld browser") { LLFloaterMediaBrowser::toggle(); -- cgit v1.1 From 4bbb219eb78fc5d77c86fb7b13f123b52fbef3bc Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 6 Sep 2009 23:08:02 -0700 Subject: Added Emerald viewer's asset browser --- linden/indra/newview/llviewermenu.cpp | 43 ++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index b937894..4c91a0a 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -211,6 +211,7 @@ #include "lltexlayer.h" #include "jcfloater_animation_list.h" +#include "llfloaterassetbrowser.h" void init_client_menu(LLMenuGL* menu); void init_server_menu(LLMenuGL* menu); @@ -7619,6 +7620,41 @@ class LLAdvancedCheckPhantom: public view_listener_t }; +/////////////////// +// ASSET BROWSER // +/////////////////// + +class LLAdvancedToggleAssetBrowser: public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + //open the floater + LLFloaterAssetBrowser::show(0); + + bool vis = false; + if(LLFloaterAssetBrowser::getInstance()) + { + vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible(); + } + return true; + } +}; + +class LLAdvancedCheckAssetBrowser: public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool vis = false; + if(LLFloaterAssetBrowser::getInstance()) + { + vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible(); + } + gMenuHolder->findControl(userdata["control"].asString())->setValue(vis); + return true; + } +}; + + /////////////////////// // CLEAR GROUP CACHE // /////////////////////// @@ -9634,9 +9670,6 @@ void initialize_menus() addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); addMenu(new LLWorldSetAway(), "World.SetAway"); addMenu(new LLWorldSetBusy(), "World.SetBusy"); - addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); - addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom"); - addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom"); addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); @@ -9786,6 +9819,10 @@ void initialize_menus() addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); + addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom"); + addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom"); + addMenu(new LLAdvancedToggleAssetBrowser(),"Advanced.ToggleAssetBrowser"); + addMenu(new LLAdvancedCheckAssetBrowser(),"Advanced.CheckAssetBrowser"); // Advanced > HUD Info addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); -- cgit v1.1 From 056f41c8542e60ea57af83bd18caa01db44a15c5 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 7 Sep 2009 00:43:37 -0700 Subject: Fixed ground sit menu entry missing check --- linden/indra/newview/llviewermenu.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 4c91a0a..cfc9a14 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -7589,6 +7589,22 @@ class LLAdvancedToggleSit: public view_listener_t } }; +class LLAdvancedCheckSit : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + if(gAgent.getAvatarObject()->mIsSitting) + { + gMenuHolder->findControl(userdata["control"].asString())->setValue(true); + } + else + { + gMenuHolder->findControl(userdata["control"].asString())->setValue(false); + } + return true; + } +}; + ///////////// // PHANTOM // @@ -9819,6 +9835,7 @@ void initialize_menus() addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); + addMenu(new LLAdvancedCheckSit(), "Emerald.CheckSit"); addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom"); addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom"); addMenu(new LLAdvancedToggleAssetBrowser(),"Advanced.ToggleAssetBrowser"); -- cgit v1.1