瀏覽代碼

Corrected DrawTextRecEx() bug

Ray 4 年之前
父節點
當前提交
015e715278
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/text.c

+ 1 - 1
src/text.c

@@ -1021,7 +1021,7 @@ void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, f
                 // Draw current character glyph
                 if ((codepoint != ' ') && (codepoint != '\t'))
                 {
-                    DrawTextCodepoint(font, codepoint, (Vector2){ position.x + textOffsetX, position.y + textOffsetY }, fontSize, isGlyphSelected? selectTint : tint);
+                    DrawTextCodepoint(font, codepoint, (Vector2){ rec.x + textOffsetX, rec.y + textOffsetY }, fontSize, isGlyphSelected? selectTint : tint);
                 }
             }