From 26614c66d4b57d857457fff8278fd8c1cb04d690 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 21 Apr 2021 02:48:43 +0200 Subject: Rework read marker, do not set it if not needed --- include/Body.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/Body.hpp') diff --git a/include/Body.hpp b/include/Body.hpp index 90e75c8..98baa6d 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -214,6 +214,7 @@ namespace QuickMedia { // Returns null if no visible items. This is the item we can see the end of BodyItem* get_last_fully_visible_item(); + BodyItem* get_last_visible_item(); void clamp_selection(); @@ -286,6 +287,7 @@ namespace QuickMedia { bool last_item_fully_visible; int first_fully_visible_item; int last_fully_visible_item; + int last_visible_item = -1; sf::Clock draw_timer; sf::Clock frame_timer; double elapsed_time_sec = 0.0; -- cgit v1.2.3