From 4764e17970d8cf5b4301f7f0519841264465faaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 23 Apr 2019 16:01:16 +0200 Subject: [PATCH] Revert "Added the ability to change the default cursor property for the RichTextLabel component." This reverts commit 4fda05e15f2dfcc96d63e3ba93b2738355cfa33a. --- scene/gui/rich_text_label.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 00d6ac3b941..10b70805e59 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -900,13 +900,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 (selection.click) + if (!underline_meta || selection.click) return CURSOR_ARROW; if (main->first_invalid_line < main->lines.size()) return CURSOR_ARROW; //invalid - return get_default_cursor_shape(); + int line = 0; + Item *item = NULL; + + ((RichTextLabel *)(this))->_find_click(main, p_pos, &item, &line); + + if (item && ((RichTextLabel *)(this))->_find_meta(item, NULL)) + return CURSOR_POINTING_HAND; + + return CURSOR_ARROW; } void RichTextLabel::_gui_input(Ref p_event) {