From bc26e012f3041529939d38ac522c18499ddff982 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 12 Apr 2021 19:46:14 +0200 Subject: Stop fucking flickering again in room list --- include/Body.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/Body.hpp') diff --git a/include/Body.hpp b/include/Body.hpp index 7c8226e..fb22a21 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -153,6 +153,8 @@ namespace QuickMedia { sf::Vector2i thumbnail_size; std::vector reactions; // TODO: Move to a different body item type std::shared_ptr extra; // TODO: Remove + + float calculated_height = -1.0f; private: // TODO: Clean up these strings when set in text, and get_title for example should return |title_text.getString()| // TODO: Use sf::String instead, removes the need to convert to utf32 every time the text is dirty (for example when resizing window) @@ -226,7 +228,7 @@ namespace QuickMedia { // because of Text::setMaxWidth 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, bool merge_with_previous = false); + float get_item_height(BodyItem *item, float width, bool load_texture = true, bool include_embedded_item = true, bool merge_with_previous = false, int item_index = -1); float get_spacing_y() const; static bool string_find_case_insensitive(const std::string &str, const std::string &substr); -- cgit v1.2.3