Improved performance of ReloadableScrollingText.

This commit is contained in:
Pieter Hulshoff 2016-08-31 15:10:27 +02:00
parent f5c7808c80
commit f1d902703e
2 changed files with 7 additions and 3 deletions

View File

@ -266,7 +266,7 @@ void ReloadableScrollingText::draw( )
{
Component::draw( );
if (!text_.empty( ) && waitEndTime_ <= 0.0f)
if (!text_.empty( ) && waitEndTime_ <= 0.0f && baseViewInfo.Alpha > 0)
{
Font *font;
@ -361,8 +361,12 @@ void ReloadableScrollingText::draw( )
if (rect.w > 0)
{
SDL::renderCopy(t, baseViewInfo.Alpha, &charRect, &rect, baseViewInfo);
rect.x += rect.w;
}
else
{
rect.x = static_cast<int>( xOrigin ) + imageMaxWidth + 1; // Stop handling the rest of the string
}
rect.x += rect.w;
}
position += glyph.advance * scale * scaleX_;

View File

@ -20,7 +20,7 @@
std::string retrofe_version_major = "0";
std::string retrofe_version_minor = "7";
std::string retrofe_version_build = "8";
std::string retrofe_version_build = "9";
std::string Version::getString()