diff options
Diffstat (limited to 'src/ImageViewer.cpp')
-rw-r--r-- | src/ImageViewer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ImageViewer.cpp b/src/ImageViewer.cpp index d2b1a95..fc31274 100644 --- a/src/ImageViewer.cpp +++ b/src/ImageViewer.cpp @@ -7,9 +7,10 @@ #include <SFML/Graphics/RectangleShape.hpp> namespace QuickMedia { - ImageViewer::ImageViewer(Manga *manga, const std::string &images_url, const std::string &chapter_title, int current_page, const Path &chapter_cache_dir, sf::Font *font) : + ImageViewer::ImageViewer(Manga *manga, const std::string &images_url, const std::string &content_title, const std::string &chapter_title, int current_page, const Path &chapter_cache_dir, sf::Font *font) : current_page(current_page), num_pages(0), + content_title(content_title), chapter_title(chapter_title), chapter_cache_dir(chapter_cache_dir), focused_page(current_page), @@ -101,7 +102,7 @@ namespace QuickMedia { // TODO: Make image loading asynchronous if(get_file_type(image_path) == FileType::REGULAR) { - fprintf(stderr, "ImageViewer: Load page %d\n", 1 + page); + fprintf(stderr, "ImageViewer: Loaded page %d\n", 1 + page); page_image_data = std::make_unique<ImageData>(); page_image_data->visible_on_screen = true; std::string image_data; @@ -268,7 +269,7 @@ namespace QuickMedia { if(focused_page != prev_focused_page) { prev_focused_page = focused_page; - page_text.setString(chapter_title + " | Page " + std::to_string(1 + focused_page) + "/" + std::to_string(num_pages)); + page_text.setString(content_title + " | " + chapter_title + " | Page " + std::to_string(1 + focused_page) + "/" + std::to_string(num_pages)); } const float font_height = page_text.getCharacterSize() + 8.0f; @@ -287,7 +288,7 @@ namespace QuickMedia { int i = 0; for(auto &page_data : image_data) { if(page_data && !page_data->visible_on_screen) { - fprintf(stderr, "ImageViewer: Unload page %d\n", 1 + i); + fprintf(stderr, "ImageViewer: Unloaded page %d\n", 1 + i); page_data.reset(); } ++i; |