From 4258650d91ae718159a22169fdcb0ffc8fb06742 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 10 Jan 2009 06:20:00 -0700 Subject: Double clicking minimap tps --- linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ linden/indra/newview/llnetmap.cpp | 19 +++++++++++++++---- linden/indra/newview/llpanelgeneral.cpp | 2 ++ linden/indra/newview/llpanelgeneral.h | 1 + .../default/xui/en-us/panel_preferences_general.xml | 4 ++++ 5 files changed, 33 insertions(+), 4 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index ca3dd81..5b4b919 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -4730,6 +4730,17 @@ Value 1 + MiniMapTeleport + + Comment + Teleport on Mini-Map double click + Persist + 1 + Type + Boolean + Value + 1 + MiniMapScale Comment diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 22dee9d..ee853fe 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -604,9 +604,13 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec buffer = region->getHost().getString(); msg.append(buffer); #endif - // *TODO: put this under the control of XUI so it can be - // translated. - msg.append("\n(Double-click to open Map)"); + // *TODO: + // - put this under the control of XUI so it can be translated. + + if ( gSavedSettings.getBOOL( "MiniMapTeleport" )) + msg.append("\n(Double-click to teleport)"); + else + msg.append("\n(Double-click to open Map)"); S32 SLOP = 4; localPointToScreen( @@ -767,7 +771,14 @@ void LLNetMap::createObjectImage() BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask ) { - LLFloaterWorldMap::show(NULL, FALSE); + if (gSavedSettings.getBOOL( "MiniMapTeleport" )) + { + gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); + gAgent.teleportViaLocation( viewPosToGlobal(x,y) ); + } + else + LLFloaterWorldMap::show(NULL, FALSE); + return TRUE; } diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index 256f02a..47bc60e 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp @@ -199,6 +199,7 @@ void LLPanelGeneral::refresh() mChatOnlineNotification = gSavedSettings.getBOOL("ChatOnlineNotification"); mAFKTimeout = gSavedSettings.getF32("AFKTimeout"); mMiniMapRotate = gSavedSettings.getBOOL("MiniMapRotate"); + mMiniMapTeleport = gSavedSettings.getBOOL("MiniMapTeleport"); mNotifyMoney = gSavedSettings.getBOOL("NotifyMoneyChange"); mUseDefaultColor = gSavedSettings.getBOOL("UseDefaultColorPicker"); mEffectColor = gSavedSettings.getColor4("EffectColor"); @@ -223,6 +224,7 @@ void LLPanelGeneral::cancel() gSavedSettings.setBOOL("ChatOnlineNotification", mChatOnlineNotification ); gSavedSettings.setF32("AFKTimeout", mAFKTimeout ); gSavedSettings.setBOOL("MiniMapRotate", mMiniMapRotate ); + gSavedSettings.setBOOL("MiniMapTeleport", mMiniMapTeleport); gSavedSettings.setBOOL("NotifyMoneyChange", mNotifyMoney ); gSavedSettings.setBOOL("UseDefaultColorPicker", mUseDefaultColor ); gSavedSettings.setBOOL("ShowSearchBar", mShowSearch); diff --git a/linden/indra/newview/llpanelgeneral.h b/linden/indra/newview/llpanelgeneral.h index a7b526d..95a95f8 100644 --- a/linden/indra/newview/llpanelgeneral.h +++ b/linden/indra/newview/llpanelgeneral.h @@ -71,6 +71,7 @@ protected: F32 mUIScaleFactor; BOOL mUIAutoScale; BOOL mMiniMapRotate; + BOOL mMiniMapTeleport; S32 mOldCrashBehavior; std::string mLoginLocation; std::string mLanguage; diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml index 67d3307..092daab 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml @@ -76,6 +76,10 @@ font="SansSerifSmall" height="16" initial_value="false" label="Rotate Mini-Map" left="151" mouse_opaque="true" name="rotate_mini_map_checkbox" radio_style="false" width="256" /> +