Skip to content

Commit

Permalink
GRAPHICS: Round width and height values in Text constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
farmboy0 committed Nov 30, 2017
1 parent 03f6d17 commit bcf5ee5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/graphics/aurora/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ Text::Text(const FontHandle &font, const Common::UString &str,
Text::Text(const FontHandle &font, float w, float h, const Common::UString &str,
float r, float g, float b, float a, float halign, float valign) :
Graphics::GUIElement(Graphics::GUIElement::kGUIElementFront), _r(r), _g(g), _b(b), _a(a),
_font(font), _x(0.0f), _y(0.0f), _width(w), _height(h), _halign(halign),_valign(valign),
_font(font), _x(0.0f), _y(0.0f), _halign(halign),_valign(valign),
_disableColorTokens(false) {

_width = roundf(w);
_height = roundf(h);

setText(str);

_distance = -FLT_MAX;
Expand Down

0 comments on commit bcf5ee5

Please sign in to comment.