summaryrefslogtreecommitdiff
path: root/indra/newview/llmoveview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmoveview.cpp')
-rw-r--r--indra/newview/llmoveview.cpp53
1 files changed, 30 insertions, 23 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 4bf2bac649..1853b511be 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -77,7 +77,6 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
mTurnRightButton(NULL),
mMoveUpButton(NULL),
mMoveDownButton(NULL),
- mStopFlyingButton(NULL),
mModeActionsPanel(NULL),
mCurrentMode(MM_WALK)
{
@@ -87,6 +86,7 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
BOOL LLFloaterMove::postBuild()
{
setIsChrome(TRUE);
+ setTitleVisible(TRUE); // restore title visibility after chrome applying
LLDockableFloater::postBuild();
@@ -112,8 +112,6 @@ BOOL LLFloaterMove::postBuild()
mMoveDownButton->setHeldDownCallback(boost::bind(&LLFloaterMove::moveDown, this));
- mStopFlyingButton = getChild<LLButton>("stop_fly_btn");
-
mModeActionsPanel = getChild<LLPanel>("panel_modes");
LLButton* btn;
@@ -126,11 +124,6 @@ BOOL LLFloaterMove::postBuild()
btn = getChild<LLButton>("mode_fly_btn");
btn->setCommitCallback(boost::bind(&LLFloaterMove::onFlyButtonClick, this));
- btn = getChild<LLButton>("stop_fly_btn");
- btn->setCommitCallback(boost::bind(&LLFloaterMove::onStopFlyingButtonClick, this));
-
-
-
showFlyControls(false);
initModeTooltips();
@@ -250,6 +243,12 @@ void LLFloaterMove::setSittingMode(BOOL bSitting)
else
{
LLPanelStandStopFlying::clearStandStopFlyingMode(LLPanelStandStopFlying::SSFM_STAND);
+
+ // show "Stop Flying" button if needed. EXT-871
+ if (gAgent.getFlying())
+ {
+ LLPanelStandStopFlying::setStandStopFlyingMode(LLPanelStandStopFlying::SSFM_STOP_FLYING);
+ }
}
enableInstance(!bSitting);
}
@@ -298,10 +297,6 @@ void LLFloaterMove::onFlyButtonClick()
{
setMovementMode(MM_FLY);
}
-void LLFloaterMove::onStopFlyingButtonClick()
-{
- setMovementMode(gAgent.getAlwaysRun() ? MM_RUN : MM_WALK);
-}
void LLFloaterMove::setMovementMode(const EMovementMode mode)
{
@@ -347,16 +342,13 @@ void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode)
showFlyControls(MM_FLY == newMode);
setModeTooltip(newMode);
setModeButtonToggleState(newMode);
+ setModeTitle(newMode);
}
void LLFloaterMove::showFlyControls(bool bShow)
{
mMoveUpButton->setVisible(bShow);
mMoveDownButton->setVisible(bShow);
-
- // *TODO: mantipov: mStopFlyingButton from the FloaterMove is not used now.
- // It was not completly removed until functionality is reviewed by LL
- mStopFlyingButton->setVisible(FALSE);
}
void LLFloaterMove::initModeTooltips()
@@ -414,11 +406,30 @@ void LLFloaterMove::setModeTooltip(const EMovementMode mode)
}
}
+void LLFloaterMove::setModeTitle(const EMovementMode mode)
+{
+ std::string title;
+ switch(mode)
+ {
+ case MM_WALK:
+ title = getString("walk_title");
+ break;
+ case MM_RUN:
+ title = getString("run_title");
+ break;
+ case MM_FLY:
+ title = getString("fly_title");
+ break;
+ default:
+ // title should be provided for all modes
+ llassert(false);
+ break;
+ }
+ setTitle(title);
+}
+
/**
* Updates position of the floater to be center aligned with Move button.
- *
- * Because Tip floater created as dependent floater this method
- * must be called before "showQuickTips()" to get Tip floater be positioned at the right side of the floater
*/
void LLFloaterMove::updatePosition()
{
@@ -684,10 +695,6 @@ void LLPanelStandStopFlying::onStandButtonClick()
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
setFocus(FALSE); // EXT-482
-
- BOOL fly = gAgent.getFlying();
- mStopFlyingButton->setVisible(fly);
- setVisible(fly);
}
void LLPanelStandStopFlying::onStopFlyingButtonClick()