From 1406ea55305666958d265855cf400e7fc1cdbbf7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 7 Apr 2022 15:01:47 +0200 Subject: 4chan: move replies text to reactions, clear reactions when not visible on screen --- include/Body.hpp | 1 - include/BodyItem.hpp | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/Body.hpp b/include/Body.hpp index ec73a29..373c6b4 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -221,7 +221,6 @@ namespace QuickMedia { mgl::Sprite loading_icon; mgl::Text progress_text; - mgl::Text replies_text; mgl::Text embedded_item_load_text; bool body_size_changed = false; diff --git a/include/BodyItem.hpp b/include/BodyItem.hpp index 2e7dad4..510d0e9 100644 --- a/include/BodyItem.hpp +++ b/include/BodyItem.hpp @@ -52,8 +52,11 @@ namespace QuickMedia { }; struct Reaction { + std::string text_str; std::unique_ptr text; void *userdata = nullptr; + mgl::vec2f size; + mgl::Color text_color; }; class BodyItem { @@ -113,6 +116,7 @@ namespace QuickMedia { dirty_author = true; } + void add_reaction(std::string text, void *userdata, mgl::Color text_color); void add_reaction(std::string text, void *userdata); // Returns true if reaction is found @@ -148,6 +152,7 @@ namespace QuickMedia { bool dirty_description; bool dirty_author; bool dirty_timestamp; + bool dirty_reactions; // TODO: Remove this and instead if |thumbnail_url| starts with file://, then its a local file bool thumbnail_is_local; std::unique_ptr title_text; -- cgit v1.2.3