diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-03-16 11:08:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-16 11:08:29 -0700 |
commit | 67764bff6455258ed669542bf2cb048315851730 (patch) | |
tree | afe023af2287dced2d2bd1593d944641d9672413 | |
parent | 8965ff90ca0e1ddeeb17e87c72701ecda6edd593 (diff) | |
parent | b852a7a85482d2bb78d630fef5782d2007d57881 (diff) |
Merge pull request #26788 from mo7sener/master
RichTextLabel: Adding the ability to change the default cursor
-rw-r--r-- | scene/gui/rich_text_label.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 9bcf10d5e7..8968923b2c 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -900,21 +900,13 @@ 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) + if (selection.click) return CURSOR_ARROW; if (main->first_invalid_line < main->lines.size()) return CURSOR_ARROW; //invalid - 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; + return get_default_cursor_shape(); } void RichTextLabel::_gui_input(Ref<InputEvent> p_event) { |