diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ResourceCache.hpp | 2 | ||||
-rw-r--r-- | include/Text.hpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/ResourceCache.hpp b/include/ResourceCache.hpp index 7361862..de35500 100644 --- a/include/ResourceCache.hpp +++ b/include/ResourceCache.hpp @@ -17,7 +17,7 @@ namespace dchat { public: // Throws FailedToLoadResourceException on failure - static const sf::Font& getFont(const std::string &filepath); + static const sf::Font* getFont(const std::string &filepath); // Throws FailedToLoadResourceException on failure static sf::Texture* getTexture(const std::string &filepath); diff --git a/include/Text.hpp b/include/Text.hpp index 93ec0c1..4bb5ec0 100644 --- a/include/Text.hpp +++ b/include/Text.hpp @@ -13,8 +13,8 @@ namespace dchat class Text { public: - Text(const sf::Font &font); - Text(const sf::String &str, const sf::Font &font, unsigned int characterSize, float maxWidth, bool plainText = true); + Text(const sf::Font *font); + Text(const sf::String &str, const sf::Font *font, unsigned int characterSize, float maxWidth, bool plainText = true); void setString(const sf::String &str); void appendStringNewLine(const sf::String &str); @@ -52,7 +52,7 @@ namespace dchat }; sf::String str; - sf::Font font; + const sf::Font *font; unsigned int characterSize; sf::VertexArray vertices; float maxWidth; |