From 47bf2aa1112b558aa5393cc331fcf1f2756eb9db Mon Sep 17 00:00:00 2001 From: Xavier Sellier Date: Thu, 1 Oct 2020 19:01:34 +0200 Subject: [PATCH] [2.1] Fixes for RichTextLabel Fixes https://github.com/godotengine/godot/issues/34889 and https://github.com/godotengine/godot/issues/34889 --- scene/gui/rich_text_label.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index b64f2db30eb..dd8bda17d9d 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -722,20 +722,21 @@ void RichTextLabel::_find_click(ItemFrame *p_frame, const Point2i &p_click, Item Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const { if (!underline_meta || selection.click) - return CURSOR_ARROW; + return get_default_cursor_shape(); if (main->first_invalid_line < main->lines.size()) - return CURSOR_ARROW; //invalid + return get_default_cursor_shape(); //invalid int line = 0; + bool outside; Item *item = NULL; - ((RichTextLabel *)(this))->_find_click(main, p_pos, &item, &line); + ((RichTextLabel *)(this))->_find_click(main, p_pos, &item, &line, &outside); - if (item && ((RichTextLabel *)(this))->_find_meta(item, NULL)) + if (item && !outside && ((RichTextLabel *)(this))->_find_meta(item, NULL)) return CURSOR_POINTING_HAND; - return CURSOR_ARROW; + return get_default_cursor_shape(); } void RichTextLabel::_input_event(InputEvent p_event) {