From 11cc8e1209e99d394febfde0696b94dd69972e4a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 29 May 2021 15:03:39 +0200 Subject: Work on body swipe, fix body scrolling being jerky with touch --- include/Body.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/Body.hpp b/include/Body.hpp index a7b0045..388d825 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -268,6 +268,7 @@ namespace QuickMedia { sf::Shader *thumbnail_mask_shader; AttachSide attach_side = AttachSide::TOP; bool title_mark_urls = false; + bool swiping_enabled = false; std::function on_top_reached = nullptr; std::function on_bottom_reached = nullptr; @@ -336,6 +337,9 @@ namespace QuickMedia { sf::Vector2f mouse_scroll_accel; sf::Vector2f body_pos; sf::Vector2f body_size; + double body_swipe_x = 0.0; + bool body_swipe_move_right = false; + bool grabbed_left_side = false; float selected_item_height = 0.0f; std::shared_ptr clicked_body_item = nullptr; RoundedRectangle item_background; -- cgit v1.2.3