From c183479553dbc81e0eb7f632720c278fa5308b2c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 10 Nov 2020 19:14:08 +0100 Subject: Scroll page instead of changing body item if the item cant be fully displayed inside the window --- include/Body.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/Body.hpp b/include/Body.hpp index 294295b..1fa32bb 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -145,10 +145,10 @@ namespace QuickMedia { // Select next page, ignoring invisible items. Returns true if the item was changed. This can be used to check if the bottom was hit when wrap_around is set to false bool select_next_page(); - // Select previous item, ignoring invisible items. Returns true if the item was changed. This can be used to check if the top was hit when wrap_around is set to false + // 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(); - // Select next item, ignoring invisible items. Returns true if the item was changed. This can be used to check if the bottom was hit when wrap_around is set to false + // 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(); void set_selected_item(int item, bool reset_prev_selected_item = true); @@ -236,5 +236,7 @@ namespace QuickMedia { int last_fully_visible_item; sf::Clock draw_timer; double elapsed_time_sec = 0.0; + bool selected_line_top_visible = true; + bool selected_line_bottom_visible = true; }; } \ No newline at end of file -- cgit v1.2.3