diff options
Diffstat (limited to 'include/BodyItem.hpp')
-rw-r--r-- | include/BodyItem.hpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/BodyItem.hpp b/include/BodyItem.hpp index 819b730..b7dc48a 100644 --- a/include/BodyItem.hpp +++ b/include/BodyItem.hpp @@ -96,25 +96,28 @@ namespace QuickMedia { dirty_timestamp = true; } - void set_title_color(mgl::Color new_color) { - if(new_color == title_color) + void set_title_color(mgl::Color new_color, bool new_force_color = false) { + if(new_color == title_color && new_force_color == force_description_color) return; title_color = new_color; dirty = true; + force_title_color = new_force_color; } - void set_description_color(mgl::Color new_color) { - if(new_color == description_color) + void set_description_color(mgl::Color new_color, bool new_force_color = false) { + if(new_color == description_color && new_force_color == force_description_color) return; description_color = new_color; dirty_description = true; + force_description_color = new_force_color; } - void set_author_color(mgl::Color new_color) { - if(new_color == author_color) + void set_author_color(mgl::Color new_color, bool new_force_color = false) { + if(new_color == author_color && new_force_color == force_description_color) return; author_color = new_color; dirty_author = true; + force_author_color = new_force_color; } void add_reaction(std::string text, void *userdata, mgl::Color text_color); @@ -145,6 +148,8 @@ namespace QuickMedia { void draw_list(Body *body, mgl::Window &render_target); + // TODO: Bits for bools + // TODO: Use a list of strings instead, not all plugins need all of these fields std::string url; std::string thumbnail_url; @@ -156,6 +161,9 @@ namespace QuickMedia { bool dirty_reactions; // TODO: Remove this and instead if |thumbnail_url| starts with file://, then its a local file bool thumbnail_is_local; + bool force_title_color = false; + bool force_description_color = false; + bool force_author_color = false; std::unique_ptr<Text> title_text; std::unique_ptr<Text> description_text; std::unique_ptr<Text> author_text; |