diff options
Diffstat (limited to 'include/Body.hpp')
-rw-r--r-- | include/Body.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/Body.hpp b/include/Body.hpp index e4c21fc..235de72 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -36,17 +36,23 @@ namespace QuickMedia { dirty_description = true; } + void set_author(std::string str) { + author = std::move(str); + dirty_author = true; + } + const std::string& get_title() const { return title; } const std::string& get_description() const { return description; } + const std::string& get_author() const { return author; } // TODO: Use a list of strings instead, not all plugins need all of these fields std::string url; std::string thumbnail_url; std::string attached_content_url; // TODO: Remove and use |url| instead - std::string author; bool visible; bool dirty; bool dirty_description; + bool dirty_author; bool thumbnail_is_local; std::unique_ptr<Text> title_text; std::unique_ptr<Text> description_text; @@ -57,13 +63,14 @@ namespace QuickMedia { private: std::string title; std::string description; + std::string author; }; using BodyItems = std::vector<std::unique_ptr<BodyItem>>; class Body { public: - Body(Program *program, sf::Font *font, sf::Font *bold_font); + Body(Program *program, sf::Font *font, sf::Font *bold_font, sf::Font *cjk_font); // Select previous item, ignoring invisible items. Returns true if the item was changed. This can be used to check if the top was hit when wrap_around is set to false bool select_previous_item(); @@ -97,6 +104,7 @@ namespace QuickMedia { sf::Font *font; sf::Font *bold_font; + sf::Font *cjk_font; sf::Text progress_text; sf::Text author_text; sf::Text replies_text; |