aboutsummaryrefslogtreecommitdiff
path: root/include/Body.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-23 23:45:21 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-23 23:45:25 +0200
commit4690ba0cc66338b1f00e08fb6054ee95c1c0dcc6 (patch)
tree17f609546b85cb6b1243e53f66c27fd89ead91ef /include/Body.hpp
parent23dd37254cdf7479b88a7f1d711ecb5de92440e8 (diff)
Fallback to cjk font, change font to system noto sans
Diffstat (limited to 'include/Body.hpp')
-rw-r--r--include/Body.hpp12
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;