diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Body.hpp | 8 | ||||
-rw-r--r-- | include/QuickMedia.hpp | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/Body.hpp b/include/Body.hpp index 9c7c1c1..ce61811 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -3,7 +3,6 @@ #include "Text.hpp" #include "AsyncImageLoader.hpp" #include <SFML/Graphics/Text.hpp> -#include <SFML/Graphics/Texture.hpp> #include <SFML/Graphics/RectangleShape.hpp> #include <SFML/Graphics/Sprite.hpp> #include "../external/RoundedRectangleShape.hpp" @@ -14,6 +13,7 @@ namespace sf { class RenderWindow; class Shader; + class Texture; } namespace QuickMedia { @@ -113,7 +113,7 @@ namespace QuickMedia { std::vector<size_t> replies; std::string post_number; void *userdata; // Not managed, should be deallocated by whoever sets this - sf::Int32 last_drawn_time; + double 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; @@ -134,7 +134,7 @@ namespace QuickMedia { class Body { public: - Body(Program *program, sf::Font *font, sf::Font *bold_font, sf::Font *cjk_font); + Body(Program *program, sf::Font *font, sf::Font *bold_font, sf::Font *cjk_font, sf::Texture &loading_icon_texture); // Select previous page, 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_page(); @@ -229,9 +229,11 @@ namespace QuickMedia { sf::RectangleShape item_separator; sf::RoundedRectangleShape item_background; sf::Sprite image; + sf::Sprite loading_icon; int num_visible_items; bool last_item_fully_visible; int last_fully_visible_item; sf::Clock draw_timer; + double elapsed_time_sec = 0.0; }; }
\ No newline at end of file diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index 955fc9c..45c499a 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -97,6 +97,7 @@ namespace QuickMedia { std::unique_ptr<sf::Font> cjk_font; const char *plugin_name = nullptr; sf::Texture plugin_logo; + sf::Texture loading_icon; PageType current_page; std::stack<PageType> page_stack; int image_index; |