diff --git a/examples/text/text_font_filters.cpp b/examples/text/text_font_filters.cpp index 06f12df..f7586d9 100644 --- a/examples/text/text_font_filters.cpp +++ b/examples/text/text_font_filters.cpp @@ -48,7 +48,7 @@ int main(void) { // Update //---------------------------------------------------------------------------------- - msg.SetFontSize(msg.GetFontSize() + GetMouseWheelMove() * 4.0f); + msg.fontSize += GetMouseWheelMove() * 4.0f; // Choose font texture filter method if (IsKeyPressed(KEY_ONE)) @@ -76,8 +76,7 @@ int main(void) // Load a dropped TTF file dynamically (at current fontSize) for (const auto& file : raylib::GetDroppedFiles()) { if (raylib::IsFileExtension(file, ".ttf")) { - font = raylib::Font(file, font.GetBaseSize()); - msg.SetFont(font); + msg.font = font = raylib::Font(file, font.GetBaseSize()); } } //---------------------------------------------------------------------------------- diff --git a/include/Text.hpp b/include/Text.hpp index fc3b493..ab4b915 100644 --- a/include/Text.hpp +++ b/include/Text.hpp @@ -64,7 +64,7 @@ class Text { * * @see DrawTextPro() */ - inline void Draw(const ::Vector2& position, const Vector2& origin, float rotation = 0) { + inline void Draw(const ::Vector2& position, float rotation, const Vector2& origin = {0, 0}) { ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, color); }