소스 검색

Fix LineEdit cursor

neikeq 9 년 전
부모
커밋
f499fb6fcf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;