aboutsummaryrefslogtreecommitdiff
path: root/include/Body.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Body.hpp')
-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);