aboutsummaryrefslogtreecommitdiff
path: root/include/Body.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Body.hpp')
-rw-r--r--include/Body.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index cdb0ad0..7032ad8 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -13,6 +13,7 @@
namespace sf {
class RenderWindow;
+ class Shader;
}
namespace QuickMedia {
@@ -25,6 +26,11 @@ namespace QuickMedia {
FAILED_TO_LOAD
};
+ enum class ThumbnailMaskType {
+ NONE,
+ CIRCLE
+ };
+
class BodyItem {
public:
BodyItem(std::string _title);
@@ -97,6 +103,7 @@ namespace QuickMedia {
sf::Int32 last_drawn_time;
EmbeddedItemStatus embedded_item_status = EmbeddedItemStatus::NONE;
std::shared_ptr<BodyItem> embedded_item; // Used by matrix for example to display reply message body. Note: only the first level of embedded items is rendered (not recursive, this is done on purpose)
+ ThumbnailMaskType thumbnail_mask_type = ThumbnailMaskType::NONE;
private:
// TODO: Clean up these strings when set in text, and get_title for example should return |title_text.getString()|
std::string title;
@@ -188,6 +195,7 @@ namespace QuickMedia {
sf::Vector2f thumbnail_fallback_size;
sf::Color line_seperator_color;
BodyItemRenderCallback body_item_render_callback;
+ sf::Shader *thumbnail_mask_shader;
private:
void draw_item(sf::RenderWindow &window, BodyItem *item, const sf::Vector2f &pos, const sf::Vector2f &size, const float item_height, const int item_index, const Json::Value &content_progress, bool include_embedded_item = true);
void update_dirty_state(BodyItem *body_item, sf::Vector2f size);