Skip to content
Snippets Groups Projects
Commit bf25f3fd authored by Mike Antipov's avatar Mike Antipov
Browse files

Work on normal bug EXT-4518 (movement & camera floaters should have window titles)

-- done for Move floater.
-- deprecated comments cleaned up

--HG--
branch : product-engine
parent f864d74a
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,7 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
BOOL LLFloaterMove::postBuild()
{
setIsChrome(TRUE);
setTitleVisible(TRUE); // restore title visibility after chrome applying
LLDockableFloater::postBuild();
......@@ -353,6 +354,7 @@ void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode)
showFlyControls(MM_FLY == newMode);
setModeTooltip(newMode);
setModeButtonToggleState(newMode);
setModeTitle(newMode);
}
void LLFloaterMove::showFlyControls(bool bShow)
......@@ -420,11 +422,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()
{
......
......@@ -92,7 +92,7 @@ class LLFloaterMove
void showFlyControls(bool bShow);
void initModeTooltips();
void setModeTooltip(const EMovementMode mode);
void showQuickTips(const EMovementMode mode);
void setModeTitle(const EMovementMode mode);
void initModeButtonMap();
void setModeButtonToggleState(const EMovementMode mode);
void updateButtonsWithMovementMode(const EMovementMode newMode);
......
......@@ -38,6 +38,18 @@
name="fly_back_tooltip">
Fly Backwards (press Down Arrow or S)
</string>
<string
name="walk_title">
Walk
</string>
<string
name="run_title">
Run
</string>
<string
name="fly_title">
Fly
</string>
<panel
border="false"
height="83"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment