aboutsummaryrefslogtreecommitdiff
path: root/include/Body.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Body.hpp')
-rw-r--r--include/Body.hpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 869ce0b..53622e8 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -176,10 +176,10 @@ namespace QuickMedia {
bool select_next_page();
// Select previous item, ignoring invisible items. Returns true if the item was changed or if the item scrolled. This can be used to check if the top was hit when wrap_around is set to false
- bool select_previous_item(bool scroll_page_if_large_item = true);
+ bool select_previous_item(bool scroll_page_if_large_item = true, bool reset_select_scroll = true);
// Select next item, ignoring invisible items. Returns true if the item was changed or if the item scrolled. This can be used to check if the bottom was hit when wrap_around is set to false
- bool select_next_item(bool scroll_page_if_large_item = true);
+ bool select_next_item(bool scroll_page_if_large_item = true, bool reset_select_scroll = true);
void set_selected_item(int item, bool reset_prev_selected_item = true);
void reset_prev_selected_item();
@@ -214,7 +214,7 @@ namespace QuickMedia {
// This happens because of |draw| sets thumbnails as unreferenced at the beginning and cleans them up at the end if they are not drawn in the same function call.
// TODO: Right now drawing an item that also exists in the body will cause the text to update geometry every frame if the text is wrapping text and the items are drawn at different sizes,
// because of Text::setMaxWidth
- void draw_item(sf::RenderWindow &window, BodyItem *item, sf::Vector2f pos, sf::Vector2f size, bool include_embedded_item = true);
+ void draw_item(sf::RenderWindow &window, BodyItem *item, sf::Vector2f pos, sf::Vector2f size, bool include_embedded_item = true, bool is_embedded = false);
float get_item_height(BodyItem *item, float width, bool load_texture = true, bool include_embedded_item = true);
float get_spacing_y() const;
@@ -232,7 +232,7 @@ namespace QuickMedia {
int get_selected_item() const { return selected_item; }
bool is_selected_item_last_visible_item() const;
- void set_page_scroll(float scroll) { page_scroll = scroll; }
+ void set_page_scroll(float scroll);
float get_page_scroll() const { return page_scroll; }
// This is the item we can see the end of
bool is_last_item_fully_visible() const { return last_item_fully_visible; }
@@ -270,6 +270,7 @@ namespace QuickMedia {
sf::Sprite image;
sf::Sprite loading_icon;
int num_visible_items;
+ bool first_item_fully_visible;
bool last_item_fully_visible;
int first_fully_visible_item;
int last_fully_visible_item;
@@ -281,10 +282,10 @@ 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;
+ int clamp_selected_item_to_body_count = 1;
bool mouse_left_pressed = false;
bool mouse_left_clicked = false;
+ bool has_scrolled_with_input = false;
sf::Vector2f mouse_click_pos;
sf::Vector2f mouse_release_pos;
double mouse_press_pixels_moved_abs;