From 840e1da8aa4b019ebf08c8c36c72ac01ad592506 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 3 Mar 2014 14:08:26 -0500 Subject: STORM-2017 Untranslatable text appears when scaling, or moving objects --- indra/newview/llmaniptranslate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llmaniptranslate.cpp') diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 06bf294417..e84207461c 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -61,6 +61,7 @@ #include "llui.h" #include "pipeline.h" #include "llviewershadermgr.h" +#include "lltrans.h" const S32 NUM_AXES = 3; const S32 MOUSE_DRAG_SLOP = 2; // pixels @@ -1441,11 +1442,11 @@ void LLManipTranslate::renderSnapGuides() LLVector3 help_text_pos = selection_center_start + (snap_offset_meters_up * 3.f * mSnapOffsetAxis); const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); - std::string help_text = "Move mouse cursor over ruler"; + std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f); hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); - help_text = "to snap to grid"; + help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapOffsetMeters * 0.2f; hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); } -- cgit v1.2.3 From fe2801fc63a428f47b29e151cfb71b4558305ceb Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Mon, 3 Mar 2014 21:50:12 -0800 Subject: STORM-2017: Added translatable help text to rotation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I chose the camera’s up vector to place the help text as it provided a consistent location on the screen for the user to see the text pop up. While doing this I realized that the calls to hud_render_utf8text utilized a condition that was guaranteed to be false based on a surrounding if-statement, and so could trivially be replaced with a constant. Also cleaned out a compiler warning about unused private member variables in llmaniptranslate. I don’t like warnings and useless code. :P --- indra/newview/llmaniptranslate.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llmaniptranslate.cpp') diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index e84207461c..d237e5ef44 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -112,7 +112,6 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) : LLManip( std::string("Move"), composite ), mLastHoverMouseX(-1), mLastHoverMouseY(-1), - mSendUpdateOnMouseUp(FALSE), mMouseOutsideSlop(FALSE), mCopyMadeThisDrag(FALSE), mMouseDownX(-1), @@ -126,7 +125,6 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) mSnapOffsetMeters(0.f), mSubdivisions(10.f), mInSnapRegime(FALSE), - mSnapped(FALSE), mArrowScales(1.f, 1.f, 1.f), mPlaneScales(1.f, 1.f, 1.f), mPlaneManipPositions(1.f, 1.f, 1.f, 1.f) @@ -1445,10 +1443,10 @@ void LLManipTranslate::renderSnapGuides() std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f); - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapOffsetMeters * 0.2f; - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); } } } -- cgit v1.2.3