diff --git a/src/modules/graphics/TextBatch.cpp b/src/modules/graphics/TextBatch.cpp index 9d47dec19..2b8ca9f33 100644 --- a/src/modules/graphics/TextBatch.cpp +++ b/src/modules/graphics/TextBatch.cpp @@ -229,7 +229,7 @@ Font *TextBatch::getFont() const return font.get(); } -int TextBatch::getWidth(int index) const +float TextBatch::getWidth(int index) const { if (index < 0) index = std::max((int) textData.size() - 1, 0); @@ -240,7 +240,7 @@ int TextBatch::getWidth(int index) const return textData[index].textInfo.width; } -int TextBatch::getHeight(int index) const +float TextBatch::getHeight(int index) const { if (index < 0) index = std::max((int) textData.size() - 1, 0); diff --git a/src/modules/graphics/TextBatch.h b/src/modules/graphics/TextBatch.h index 210857dc3..cd7693101 100644 --- a/src/modules/graphics/TextBatch.h +++ b/src/modules/graphics/TextBatch.h @@ -57,12 +57,12 @@ public: /** * Gets the width of the currently set text. **/ - int getWidth(int index = 0) const; + float getWidth(int index = 0) const; /** * Gets the height of the currently set text. **/ - int getHeight(int index = 0) const; + float getHeight(int index = 0) const; // Implements Drawable. void draw(love::graphics::Graphics *gfx, const Matrix4 &m) override;