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) ...@@ -87,6 +87,7 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
BOOL LLFloaterMove::postBuild() BOOL LLFloaterMove::postBuild()
{ {
setIsChrome(TRUE); setIsChrome(TRUE);
setTitleVisible(TRUE); // restore title visibility after chrome applying
LLDockableFloater::postBuild(); LLDockableFloater::postBuild();
...@@ -353,6 +354,7 @@ void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode) ...@@ -353,6 +354,7 @@ void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode)
showFlyControls(MM_FLY == newMode); showFlyControls(MM_FLY == newMode);
setModeTooltip(newMode); setModeTooltip(newMode);
setModeButtonToggleState(newMode); setModeButtonToggleState(newMode);
setModeTitle(newMode);
} }
void LLFloaterMove::showFlyControls(bool bShow) void LLFloaterMove::showFlyControls(bool bShow)
...@@ -420,11 +422,30 @@ void LLFloaterMove::setModeTooltip(const EMovementMode mode) ...@@ -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. * 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() void LLFloaterMove::updatePosition()
{ {
......
...@@ -92,7 +92,7 @@ private: ...@@ -92,7 +92,7 @@ private:
void showFlyControls(bool bShow); void showFlyControls(bool bShow);
void initModeTooltips(); void initModeTooltips();
void setModeTooltip(const EMovementMode mode); void setModeTooltip(const EMovementMode mode);
void showQuickTips(const EMovementMode mode); void setModeTitle(const EMovementMode mode);
void initModeButtonMap(); void initModeButtonMap();
void setModeButtonToggleState(const EMovementMode mode); void setModeButtonToggleState(const EMovementMode mode);
void updateButtonsWithMovementMode(const EMovementMode newMode); void updateButtonsWithMovementMode(const EMovementMode newMode);
......
...@@ -38,6 +38,18 @@ ...@@ -38,6 +38,18 @@
name="fly_back_tooltip"> name="fly_back_tooltip">
Fly Backwards (press Down Arrow or S) Fly Backwards (press Down Arrow or S)
</string> </string>
<string
name="walk_title">
Walk
</string>
<string
name="run_title">
Run
</string>
<string
name="fly_title">
Fly
</string>
<panel <panel
border="false" border="false"
height="83" 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