فهرست منبع

Merge pull request #1526 from michalsrb/next

Fix text rendering on non-integer x position.
Sean Taylor 11 سال پیش
والد
کامیت
a3e1fa6510
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      gameplay/src/Font.cpp

+ 2 - 2
gameplay/src/Font.cpp

@@ -351,7 +351,7 @@ Font::Text* Font::createText(const char* text, const Rectangle& area, const Vect
                     truncated = true;
                     break;
                 }
-                else if (xPos >= area.x)
+                else if (xPos >= (int)area.x)
                 {
                     // Draw this character.
                     if (draw)
@@ -784,7 +784,7 @@ void Font::drawText(const char* text, const Rectangle& area, const Vector4& colo
                     truncated = true;
                     break;
                 }
-                else if (xPos >= area.x)
+                else if (xPos >= (int)area.x)
                 {
                     // Draw this character.
                     if (draw)