aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-04-12 19:46:14 +0200
committerdec05eba <dec05eba@protonmail.com>2021-04-12 19:46:14 +0200
commitbc26e012f3041529939d38ac522c18499ddff982 (patch)
treec80ebb2fae502540afd59057967221a15e82dd94 /include
parente89aae6aa17d33cae1165af7c4f6cd688d9c22f5 (diff)
Stop fucking flickering again in room list
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp4
1 files changed, 3 insertions, 1 deletions
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<Reaction> reactions; // TODO: Move to a different body item type
std::shared_ptr<BodyItemExtra> 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);