diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Channel.hpp | 2 | ||||
-rw-r--r-- | include/Gif.hpp | 2 | ||||
-rw-r--r-- | include/ResourceCache.hpp | 3 | ||||
-rw-r--r-- | include/Text.hpp | 2 | ||||
-rw-r--r-- | include/User.hpp | 1 |
5 files changed, 7 insertions, 3 deletions
diff --git a/include/Channel.hpp b/include/Channel.hpp index 17128fd..1acfcd1 100644 --- a/include/Channel.hpp +++ b/include/Channel.hpp @@ -40,7 +40,7 @@ namespace dchat OnlineUser* getUserByPublicKey(const odhtdb::Signature::PublicKey &publicKey); const odhtdb::DatabaseNode& getNodeInfo() const; - // If timestamp is 0, then timestamp is not used + // If timestamp is 0, then current time is used void addLocalMessage(const std::string &msg, User *owner, u64 timestampSeconds = 0); void addMessage(const std::string &msg); void addUserLocally(User *user); diff --git a/include/Gif.hpp b/include/Gif.hpp index 84299e9..8f5d4e7 100644 --- a/include/Gif.hpp +++ b/include/Gif.hpp @@ -32,7 +32,7 @@ namespace dchat void setPosition(const sf::Vector2f &position); void setScale(const sf::Vector2f &scale); - void draw(sf::RenderTarget &target); + void draw(sf::RenderTarget &target, const sf::RenderStates &renderStates = sf::RenderStates::Default); static bool isDataGif(const StringView &data); private: diff --git a/include/ResourceCache.hpp b/include/ResourceCache.hpp index de35500..75ebd88 100644 --- a/include/ResourceCache.hpp +++ b/include/ResourceCache.hpp @@ -2,6 +2,7 @@ #include <SFML/Graphics/Font.hpp> #include <SFML/Graphics/Texture.hpp> +#include <SFML/Graphics/Shader.hpp> #include <string> #include <stdexcept> @@ -21,5 +22,7 @@ namespace dchat // Throws FailedToLoadResourceException on failure static sf::Texture* getTexture(const std::string &filepath); + + static sf::Shader* getShader(const std::string &filepath, sf::Shader::Type shaderType); }; } diff --git a/include/Text.hpp b/include/Text.hpp index 9df973d..0bc3ced 100644 --- a/include/Text.hpp +++ b/include/Text.hpp @@ -87,7 +87,7 @@ namespace dchat bool plainText; bool editable; CaretMoveDirection caretMoveDirection; - float totalHeight; + sf::FloatRect boundingBox; float lineSpacing; std::vector<TextElement> textElements; diff --git a/include/User.hpp b/include/User.hpp index 821be6f..a83b9dc 100644 --- a/include/User.hpp +++ b/include/User.hpp @@ -24,6 +24,7 @@ namespace dchat virtual const std::string& getName() const = 0; const Type type; + std::string avatarUrl; }; class OnlineUser : public User |