aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp7
-rw-r--r--include/QuickMedia.hpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 5e68b5b..cc11664 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -33,6 +33,12 @@ namespace QuickMedia {
CIRCLE
};
+ // TODO: Remove and create an Userdata class instead to replace the void* userdata in BodyItem
+ class BodyItemExtra {
+ public:
+ virtual ~BodyItemExtra() = default;
+ };
+
struct Reaction {
std::unique_ptr<Text> text;
void *userdata = nullptr;
@@ -146,6 +152,7 @@ namespace QuickMedia {
ThumbnailMaskType thumbnail_mask_type = ThumbnailMaskType::NONE;
sf::Vector2i thumbnail_size;
std::vector<Reaction> reactions; // TODO: Move to a different body item type
+ std::shared_ptr<BodyItemExtra> extra; // TODO: Remove
private:
// TODO: Clean up these strings when set in text, and get_title for example should return |title_text.getString()|
// TODO: Use sf::String instead, removes the need to convert to utf32 every time the text is dirty (for example when resizing window)
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 21b451d..51a97b4 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -101,7 +101,7 @@ namespace QuickMedia {
void page_loop_render(sf::RenderWindow &window, std::vector<Tab> &tabs, int selected_tab, TabAssociatedData &tab_associated_data, const Json::Value *json_chapters);
using PageLoopSubmitHandler = std::function<void(const std::vector<Tab> &new_tabs)>;
void page_loop(std::vector<Tab> &tabs, int start_tab_index = 0, PageLoopSubmitHandler after_submit_handler = nullptr);
- void video_content_page(VideoPage *video_page, std::string video_url, std::string video_title, bool download_if_streaming_fails);
+ void video_content_page(VideoPage *video_page, std::string video_title, bool download_if_streaming_fails);
// Returns -1 to go to previous chapter, 0 to stay on same chapter and 1 to go to next chapter
int image_page(MangaImagesPage *images_page, Body *chapters_body);
void image_continuous_page(MangaImagesPage *images_page);