Browse Source

Added the ability to change the default cursor property for the RichTextLabel component.

(cherry picked from commit b852a7a85482d2bb78d630fef5782d2007d57881)
Robear Selwans 6 years ago
parent
commit
4fda05e15f
1 changed files with 2 additions and 10 deletions
  1. 2 10
      scene/gui/rich_text_label.cpp

+ 2 - 10
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 {
 Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const {
 
 
-	if (!underline_meta || selection.click)
+	if (selection.click)
 		return CURSOR_ARROW;
 		return CURSOR_ARROW;
 
 
 	if (main->first_invalid_line < main->lines.size())
 	if (main->first_invalid_line < main->lines.size())
 		return CURSOR_ARROW; //invalid
 		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) {
 void RichTextLabel::_gui_input(Ref<InputEvent> p_event) {