diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-05-17 04:09:47 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-05-17 04:09:47 +0200 |
commit | 28168bb3a63b7506a79441d6ce5ed312ba6f6e1a (patch) | |
tree | c68ca0a70f3cefd4d490abcc754995641d04ddf6 /include/Body.hpp | |
parent | e37a174979059a97c342c51b741f4f89609830c4 (diff) |
Make body movement smooth, async load video related videos to allow cancellation with esc
Diffstat (limited to 'include/Body.hpp')
-rw-r--r-- | include/Body.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/Body.hpp b/include/Body.hpp index 3106cc3..8a3bce5 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -280,9 +280,12 @@ namespace QuickMedia { int selected_item; int prev_selected_item; double page_scroll; + double prev_extra_scroll = 0.0; + double extra_scroll_current = 0.0; + double extra_scroll_target = 0.0; // TODO: Use a loading gif or something similar instead, to properly indicate the image is loading. Which could also have text that says "failed to load image" when image loading failed. sf::RectangleShape image_fallback; - sf::RectangleShape item_separator; + //sf::RectangleShape item_separator; sf::Sprite image; sf::Sprite loading_icon; int num_visible_items; @@ -290,6 +293,7 @@ namespace QuickMedia { bool last_item_fully_visible; int first_fully_visible_item; int last_fully_visible_item; + int first_visible_item = -1; int last_visible_item = -1; sf::Clock draw_timer; sf::Clock frame_timer; @@ -318,5 +322,7 @@ namespace QuickMedia { RoundedRectangle item_background; RoundedRectangle reaction_background; bool render_selected_item_bg = true; + float item_background_target_pos_y = 0.0f; + float item_background_target_height = 0.0f; }; }
\ No newline at end of file |