From 4aec31515ff6f61f41dfd66551a3fce44f243535 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 20 Mar 2021 07:06:06 +0100 Subject: More work on touch (behind QM_ENABLE_TOUCH=1 environment variable), save thumbnails with their size so using a different scaling will update thumbnails to the same scale --- include/Body.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/Body.hpp b/include/Body.hpp index ac5853d..869ce0b 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -249,6 +249,7 @@ namespace QuickMedia { sf::Vector2i thumbnail_max_size; sf::Color line_separator_color; BodyItemRenderCallback body_item_render_callback; + std::function body_item_select_callback; sf::Shader *thumbnail_mask_shader; AttachSide attach_side = AttachSide::TOP; private: @@ -280,12 +281,19 @@ namespace QuickMedia { bool items_cut_off = false; float offset_to_top = 0.0f; float offset_to_bottom = 0.0f; + bool experimental_use_touch = false; bool mouse_state_set = false; bool mouse_left_pressed = false; + bool mouse_left_clicked = false; + sf::Vector2f mouse_click_pos; + sf::Vector2f mouse_release_pos; + double mouse_press_pixels_moved_abs; sf::Vector2f mouse_pos; sf::Vector2f prev_mouse_pos; sf::Vector2i mouse_pos_raw; sf::Vector2f mouse_scroll_accel; + sf::Vector2f body_pos; + sf::Vector2f body_size; float selected_item_height = 0.0f; float selected_scrolled = 0.0f; //float scroll_y = 0.0f; -- cgit v1.2.3