aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 4987735..2f1644d 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -5,6 +5,9 @@
#include <SFML/Graphics/Text.hpp>
#include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
+#include <SFML/Graphics/RectangleShape.hpp>
+#include <SFML/Graphics/Sprite.hpp>
+#include "../external/RoundedRectangleShape.hpp"
#include <json/value.h>
#include <thread>
@@ -125,8 +128,11 @@ namespace QuickMedia {
sf::Vector2f thumbnail_fallback_size;
sf::Color line_seperator_color;
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);
+ float get_item_height(BodyItem *item);
+ private:
struct ThumbnailData {
- bool referenced;
+ bool referenced = false;
std::shared_ptr<sf::Texture> texture;
bool loaded = false;
};
@@ -135,5 +141,12 @@ namespace QuickMedia {
std::unordered_map<std::string, ThumbnailData> item_thumbnail_textures;
bool loading_thumbnail;
int selected_item;
+ int prev_selected_item;
+ float page_scroll;
+ // TODO: Use a loading gif or something similar instead, to properly indicate the image is loading. Which could also have text that says "failed to load image" when image loading failed.
+ sf::RectangleShape image_fallback;
+ sf::RectangleShape item_background_shadow;
+ sf::RoundedRectangleShape item_background;
+ sf::Sprite image;
};
} \ No newline at end of file