aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-17 02:10:10 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-17 15:25:26 +0200
commitd83c0123ed3e51ef1e8d6a164e87343dd5335331 (patch)
tree7a3251eeb25a11e21204974fc2744f347367e0da /src/QuickMedia.cpp
parent95baa4316c127d65c46d2226dbeeae690340c4d6 (diff)
Show error message on failure to load image for same page
Show title of manga when viewing pages
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 44e6bd9..377729f 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -1990,9 +1990,9 @@ namespace QuickMedia {
bool redraw = true;
sf::Event event;
- sf::Text chapter_text(chapter_title + " | Page " + std::to_string(image_index + 1) + "/" + std::to_string(num_images), font, 14);
+ sf::Text chapter_text(content_title + " | " + chapter_title + " | Page " + std::to_string(image_index + 1) + "/" + std::to_string(num_images), font, 14);
if(image_index == num_images)
- chapter_text.setString(chapter_title + " | End");
+ chapter_text.setString(content_title + " | " + chapter_title + " | End");
chapter_text.setFillColor(sf::Color::White);
sf::RectangleShape chapter_text_background;
chapter_text_background.setFillColor(sf::Color(0, 0, 0, 150));
@@ -2062,6 +2062,7 @@ namespace QuickMedia {
texture_size_f = sf::Vector2f(texture_size.x, texture_size.y);
} else if(load_image_result == LoadImageResult::FAILED) {
download_in_progress = false;
+ error = true;
}
error_message.setString(error_msg);
redraw = true;
@@ -2143,7 +2144,7 @@ namespace QuickMedia {
json_chapter = Json::Value(Json::objectValue);
}
- ImageViewer image_viewer(image_plugin, images_url, chapter_title, image_index, content_cache_dir, &font);
+ ImageViewer image_viewer(image_plugin, images_url, content_title, chapter_title, image_index, content_cache_dir, &font);
json_chapter["current"] = std::min(latest_read, image_viewer.get_num_pages());
json_chapter["total"] = image_viewer.get_num_pages();