summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-23 16:10:15 +0200
committerGitHub <noreply@github.com>2019-04-23 16:10:15 +0200
commitb4d561013f113a4e33b6f0a3ac1d478dc688e765 (patch)
tree16941c873a32761d0beb4cfb590c54077637c011 /scene/gui
parent49b6423874e8ea2bdc866f5b3abe6acba1d54b1b (diff)
Revert "RichTextLabel: Adding the ability to change the default cursor"
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/rich_text_label.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 0155ad793f..d6b5c0b82d 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -901,13 +901,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<InputEvent> p_event) {