Przeglądaj źródła

Fix LineEdit cursor

neikeq 9 lat temu
rodzic
commit
f499fb6fcf
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      scene/gui/line_edit.cpp

+ 1 - 1
scene/gui/line_edit.cpp

@@ -568,7 +568,7 @@ void LineEdit::set_cursor_at_pixel_pos(int p_x) {
 		
 		int char_w = 0;
 		if (font != NULL) {
-			int char_w = font->get_char_size(text[ofs]).width;
+			char_w = font->get_char_size(text[ofs]).width;
 		}
 		pixel_ofs+=char_w;