|
@@ -397,7 +397,8 @@ void TextBox::drawImages(SpriteBatch* spriteBatch, const Rectangle& clip)
|
|
|
Vector4 color = _caretImage->getColor();
|
|
Vector4 color = _caretImage->getColor();
|
|
|
color.w *= _opacity;
|
|
color.w *= _opacity;
|
|
|
|
|
|
|
|
- spriteBatch->draw(_caretLocation.x - (region.width / 2.0f), _caretLocation.y, region.width, _fontSize, uvs.u1, uvs.v1, uvs.u2, uvs.v2, color, _viewportClipBounds);
|
|
|
|
|
|
|
+ float caretWidth = region.width * _fontSize / region.height;
|
|
|
|
|
+ spriteBatch->draw(_caretLocation.x - caretWidth * 0.5f, _caretLocation.y, caretWidth, _fontSize, uvs.u1, uvs.v1, uvs.u2, uvs.v2, color, _viewportClipBounds);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|