diff options
Diffstat (limited to 'scene/gui/rich_text_label.h')
-rw-r--r-- | scene/gui/rich_text_label.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 7fbd5f1745..93e57058b0 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -117,6 +117,10 @@ private: int char_count = 0; Line() { text_buf.instantiate(); } + + _FORCE_INLINE_ float get_height(float line_separation) const { + return offset.y + text_buf->get_size().y + text_buf->get_line_count() * line_separation; + } }; struct Item { @@ -504,6 +508,8 @@ private: void _scroll_changed(double); int _find_first_line(int p_from, int p_to, int p_vofs) const; + _FORCE_INLINE_ float _calculate_line_vertical_offset(const Line &line) const; + virtual void gui_input(const Ref<InputEvent> &p_event) override; virtual String get_tooltip(const Point2 &p_pos) const override; Item *_get_next_item(Item *p_item, bool p_free = false) const; |