aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 6ac47bf..21d996d 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -1103,25 +1103,23 @@ namespace QuickMedia {
image_size.y *= image_scale.y;
image.setPosition(std::floor(content_size.x * 0.5f - image_size.x * 0.5f), std::floor(content_size.y * 0.5f - image_size.y * 0.5f));
}
- } else {
- continue;
- }
- window.clear(back_color);
+ window.clear(back_color);
- if(error) {
- window.draw(error_message);
- } else {
- window.draw(image);
- }
+ if(error) {
+ window.draw(error_message);
+ } else {
+ window.draw(image);
+ }
- chapter_text_background.setSize(sf::Vector2f(window_size.x, background_height));
- chapter_text_background.setPosition(0.0f, std::floor(window_size.y - background_height));
- window.draw(chapter_text_background);
+ chapter_text_background.setSize(sf::Vector2f(window_size.x, background_height));
+ chapter_text_background.setPosition(0.0f, std::floor(window_size.y - background_height));
+ window.draw(chapter_text_background);
- auto text_bounds = chapter_text.getLocalBounds();
- chapter_text.setPosition(std::floor(window_size.x * 0.5f - text_bounds.width * 0.5f), std::floor(window_size.y - background_height * 0.5f - font_height * 0.5f));
- window.draw(chapter_text);
+ auto text_bounds = chapter_text.getLocalBounds();
+ chapter_text.setPosition(std::floor(window_size.x * 0.5f - text_bounds.width * 0.5f), std::floor(window_size.y - background_height * 0.5f - font_height * 0.5f));
+ window.draw(chapter_text);
+ }
window.display();
}