From 15201e791e7572c7b573e427e12a81d7e39828a1 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 16 Sep 2009 10:02:19 -0700 Subject: Moved Rotate Mini-Map option to mini-map menu, added first use dialog --- ChangeLog.txt | 19 +++++++++++++++++++ linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ linden/indra/newview/llfirstuse.cpp | 11 +++++++++++ linden/indra/newview/llfirstuse.h | 1 + linden/indra/newview/llfloatermap.cpp | 2 ++ linden/indra/newview/llnetmap.cpp | 18 ++++++++++++++++++ linden/indra/newview/llnetmap.h | 12 ++++++++++++ linden/indra/newview/llpanelgeneral.cpp | 2 -- .../newview/skins/default/xui/en-us/menu_mini_map.xml | 5 +++++ .../indra/newview/skins/default/xui/en-us/notify.xml | 5 +++++ .../default/xui/en-us/panel_preferences_general.xml | 4 ---- 11 files changed, 84 insertions(+), 6 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 806d565..ce8c579 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -43,6 +43,25 @@ modified: linden/indra/newview/llfloatermap.cpp + + * Fixed min minimap size. + + modified: linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml + + + * Moved Rotate Mini-Map option to mini-map menu, added first use dialog. + + modified: linden/indra/newview/llfirstuse.cpp + modified: linden/indra/newview/llfirstuse.h + modified: linden/indra/newview/llfloatermap.cpp + modified: linden/indra/newview/llnetmap.cpp + modified: linden/indra/newview/llnetmap.h + modified: linden/indra/newview/llpanelgeneral.cpp + modified: linden/indra/newview/app_settings/settings.xml + modified: linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml + modified: linden/indra/newview/skins/default/xui/en-us/notify.xml + modified: linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml + 2009-09-14 McCabe Maxsted diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 4ae2db3..7ce7d11 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -10317,6 +10317,17 @@ Value 1 + WarnFirstMiniMap + + Comment + Enables FirstMiniMap warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstOverrideKeys Comment diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index ee7053d..b807b17 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp @@ -131,6 +131,17 @@ void LLFirstUse::useMap() } // static +void LLFirstUse::useMiniMap() +{ + if (gSavedSettings.getWarning("FirstMiniMap")) + { + gSavedSettings.setWarning("FirstMiniMap", FALSE); + + LLNotifyBox::showXml("FirstMiniMap"); + } +} + +// static void LLFirstUse::useGoTo() { // nothing for now JC diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h index eef0537..cbb31ab 100644 --- a/linden/indra/newview/llfirstuse.h +++ b/linden/indra/newview/llfirstuse.h @@ -92,6 +92,7 @@ public: static void useBalanceDecrease(S32 delta); static void useSit(); static void useMap(); + static void useMiniMap(); static void useGoTo(); static void useBuild(); static void useLeftClickNoHit(); diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index e70f4f1..a1ab97e 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp @@ -43,6 +43,7 @@ #include "lluictrlfactory.h" // radar +#include "llfirstuse.h" #include "llfloateravatarinfo.h" #include "llfloaterfriends.h" #include "llfloatergroupinvite.h" @@ -172,6 +173,7 @@ void LLFloaterMap::open() if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP)) { LLFloater::open(); + LLFirstUse::useMiniMap(); } } // [/RLVa:KB] diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index c1a25f9..c407f04 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -99,6 +99,8 @@ LLNetMap::LLNetMap(const std::string& name) : (new LLScaleMap())->registerListener(this, "MiniMap.ZoomLevel"); (new LLCenterMap())->registerListener(this, "MiniMap.Center"); (new LLCheckCenterMap())->registerListener(this, "MiniMap.CheckCenter"); + (new LLRotateMap())->registerListener(this, "MiniMap.Rotate"); + (new LLCheckRotateMap())->registerListener(this, "MiniMap.CheckRotate"); (new LLShowWorldMap())->registerListener(this, "MiniMap.ShowWorldMap"); (new LLStopTracking())->registerListener(this, "MiniMap.StopTracking"); (new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking"); @@ -935,6 +937,22 @@ bool LLNetMap::LLScaleMap::handleEvent(LLPointer event, const LLSD& use return true; } +bool LLNetMap::LLRotateMap::handleEvent(LLPointer event, const LLSD& userdata) +{ + BOOL rotate = gSavedSettings.getBOOL("MiniMapRotate"); + gSavedSettings.setBOOL("MiniMapRotate", !rotate); + + return true; +} + +bool LLNetMap::LLCheckRotateMap::handleEvent(LLPointer event, const LLSD& userdata) +{ + LLNetMap *self = mPtr; + BOOL enabled = gSavedSettings.getBOOL("MiniMapRotate"); + self->findControl(userdata["control"].asString())->setValue(enabled); + return true; +} + bool LLNetMap::LLCenterMap::handleEvent(LLPointer event, const LLSD& userdata) { S32 center = userdata.asInteger(); diff --git a/linden/indra/newview/llnetmap.h b/linden/indra/newview/llnetmap.h index 45b5e2d..55fbe1f 100644 --- a/linden/indra/newview/llnetmap.h +++ b/linden/indra/newview/llnetmap.h @@ -142,6 +142,18 @@ private: /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); }; + class LLRotateMap : public LLMemberListener + { + public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + }; + + class LLCheckRotateMap : public LLMemberListener + { + public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + }; + class LLShowWorldMap : public LLMemberListener { public: diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index f370116..490e40d 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp @@ -60,7 +60,6 @@ BOOL LLPanelGeneral::postBuild() childSetValue("small_avatar_names_checkbox", gSavedSettings.getBOOL("SmallAvatarNames")); childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); childSetValue("afk_timeout_spinner", gSavedSettings.getF32("AFKTimeout")); - childSetValue("rotate_mini_map_checkbox", gSavedSettings.getBOOL("MiniMapRotate")); childSetValue("notify_money_change_checkbox", gSavedSettings.getBOOL("NotifyMoneyChange")); childSetValue("use_system_color_picker_checkbox", gSavedSettings.getBOOL("UseDefaultColorPicker")); childSetValue("show_search_panel", gSavedSettings.getBOOL("ShowSearchBar")); @@ -96,7 +95,6 @@ void LLPanelGeneral::apply() gSavedSettings.setBOOL("SmallAvatarNames", childGetValue("small_avatar_names_checkbox")); gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); gSavedSettings.setF32("AFKTimeout", childGetValue("afk_timeout_spinner").asReal()); - gSavedSettings.setBOOL("MiniMapRotate", childGetValue("rotate_mini_map_checkbox")); gSavedSettings.setBOOL("NotifyMoneyChange", childGetValue("notify_money_change_checkbox")); gSavedSettings.setBOOL("UseDefaultColorPicker", childGetValue("use_system_color_picker_checkbox")); gSavedSettings.setBOOL("ShowSearchBar", childGetValue("show_search_panel")); diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml b/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml index 485ae9f..0172b41 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml @@ -19,6 +19,11 @@ + + + + diff --git a/linden/indra/newview/skins/default/xui/en-us/notify.xml b/linden/indra/newview/skins/default/xui/en-us/notify.xml index 99fe75a..01e2546 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notify.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notify.xml @@ -835,6 +835,11 @@ Use the controls on the right to find things and display different backgrounds. + + + Right-click the Mini-Map for more options. + + You can build new objects in some areas of [SECOND_LIFE]. 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 ea04dfc..e8a2625 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 @@ -73,10 +73,6 @@ follows="left|top" height="16" increment="1" initial_val="300" label="Away Timeout:" label_width="141" left="10" max_val="600" min_val="30" mouse_opaque="true" name="afk_timeout_spinner" width="202" /> -