diff options
| author | Steven Bennetts <steve@lindenlab.com> | 2009-10-13 16:25:48 +0000 |
|---|---|---|
| committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-13 16:25:48 +0000 |
| commit | 20e56a6925b4d4106059a73a22170beb5a38be1e (patch) | |
| tree | 6b9d6dec9f628dfa1ab948cbfb10b86fe4cdc826 /indra/newview/llmoveview.cpp | |
| parent | 330e635c2ce2ea0650226f56559cf1068df0320d (diff) | |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1992 https://svn.aws.productengine.com/secondlife/pe/stable-2@2004 -> viewer-2.0.0-3
* Bugs: EXT-1091 EXT-1418 EXT-996 EXT-1150 EXT-1188 EXT-1417 EXT-1181 EXT-1058 EXT-1397 EXT-836 EXT-1437 EXT-1379
* Dev: EXT-1291 EXT-1255 EXT-992 EXT-96 EXT-1157
Diffstat (limited to 'indra/newview/llmoveview.cpp')
| -rw-r--r-- | indra/newview/llmoveview.cpp | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index d8f00ec370..1bbcc3f98e 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -44,9 +44,7 @@ #include "llvoavatarself.h" // to check gAgent.getAvatarObject()->isSitting() #include "llbottomtray.h" #include "llbutton.h" -#include "llfirsttimetipmanager.h" #include "llfloaterreg.h" -#include "llfloaterfirsttimetip.h" #include "lljoystickbutton.h" #include "lluictrlfactory.h" #include "llviewerwindow.h" @@ -54,6 +52,7 @@ #include "llselectmgr.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" +#include "lltooltip.h" // // Constants @@ -71,7 +70,7 @@ const std::string BOTTOM_TRAY_BUTTON_NAME = "movement_btn"; // protected LLFloaterMove::LLFloaterMove(const LLSD& key) -: LLDockableFloater(NULL, false, key), +: LLDockableFloater(NULL, key), mForwardButton(NULL), mBackwardButton(NULL), mTurnLeftButton(NULL), @@ -305,7 +304,6 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) showModeButtons(!bHideModeButtons); - showQuickTips(mode); } void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode) @@ -464,6 +462,11 @@ void LLFloaterMove::enableInstance(BOOL bEnable) if (instance) { instance->setEnabled(bEnable); + + if (gAgent.getFlying()) + { + instance->showModeButtons(FALSE); + } } } @@ -487,8 +490,6 @@ void LLFloaterMove::onOpen(const LLSD& key) anchor_panel, this, getDockTongue(), LLDockControl::TOP)); - showQuickTips(mCurrentMode); - sUpdateFlyingStatus(); } @@ -500,20 +501,6 @@ void LLFloaterMove::setDocked(bool docked, bool pop_on_undock/* = true*/) updateHeight(show_mode_buttons); } -void LLFloaterMove::showQuickTips(const EMovementMode mode) -{ - LLFirstTimeTipsManager::EFirstTimeTipType tipType = LLFirstTimeTipsManager::FTT_MOVE_WALK; - switch (mode) - { - case MM_FLY: tipType = LLFirstTimeTipsManager::FTT_MOVE_FLY; break; - case MM_RUN: tipType = LLFirstTimeTipsManager::FTT_MOVE_RUN; break; - case MM_WALK: tipType = LLFirstTimeTipsManager::FTT_MOVE_WALK; break; - default: llwarns << "Quick Tip type was not detected, FTT_MOVE_WALK will be used" << llendl; - } - - LLFirstTimeTipsManager::showTipsFor(tipType, this, LLFirstTimeTipsManager::TPA_POS_LEFT_ALIGN_TOP); -} - void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode) { llassert_always(mModeControlButtonMap.end() != mModeControlButtonMap.find(mode)); @@ -610,6 +597,22 @@ void LLPanelStandStopFlying::setVisible(BOOL visible) LLPanel::setVisible(visible); } +BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask) +{ + LLToolTipMgr::instance().unblockToolTips(); + + if (mStandButton->getVisible()) + { + LLToolTipMgr::instance().show(mStandButton->getToolTip()); + } + else if (mStopFlyingButton->getVisible()) + { + LLToolTipMgr::instance().show(mStopFlyingButton->getToolTip()); + } + + return TRUE; +} + ////////////////////////////////////////////////////////////////////////// // Private Section ////////////////////////////////////////////////////////////////////////// @@ -635,7 +638,10 @@ void LLPanelStandStopFlying::onStandButtonClick() gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); setFocus(FALSE); // EXT-482 - setVisible(FALSE); + + BOOL fly = gAgent.getFlying(); + mStopFlyingButton->setVisible(fly); + setVisible(fly); } void LLPanelStandStopFlying::onStopFlyingButtonClick() |
