diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-10-16 22:57:52 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-10-16 22:57:54 +0200 |
commit | 41fd233b903587f5c643595d0497e87546ba54de (patch) | |
tree | 7c8f12e14681567cfcc1c935c56786911d8f9faf | |
parent | 56acc142c6ef9a65147acdea6737acbfaeb7eca4 (diff) |
Set fps to 4 when viewing manga
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 28 |
2 files changed, 15 insertions, 16 deletions
@@ -15,6 +15,7 @@ QuickMedia manganelo QuickMedia youtube --tor ``` ## Controls +Press `arrow up` and `arrow down` to navigate the menu and also to go to the previous/next image when viewing manga.\ Press `ESC` to go back to the previous menu.\ Press `Ctrl + T` when hovering over a manga chapter to start tracking manga after that chapter. This only works if AutoMedia is installed and accessible in PATH environment variable. @@ -46,4 +47,4 @@ The search should wait until there are search results before clearing the search Somehow deal with youtube banning ip when searching too often.\ Optimize shadow rendering for items (Right now they fill too much space that is behind items). It should also be a blurry shadow.\ When continuing to read manga from a different page from the first and there is no cache for the chapter, -then start downloading from the current page instead of page 1.
\ No newline at end of file +then start downloading from the current page instead of page 1. 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(); } |