Skip to content

Commit

Permalink
Revert "Added the ability to change the default cursor property for t…
Browse files Browse the repository at this point in the history
…he RichTextLabel component."

This reverts commit 4fda05e.
  • Loading branch information
akien-mga committed Apr 23, 2019
1 parent 39f1a11 commit 4764e17
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<InputEvent> p_event) {
Expand Down

0 comments on commit 4764e17

Please sign in to comment.