Unverified Commit cf50ee4f by Rémi Verschelde Committed by GitHub

Merge pull request #37094 from dkaste/line-edit-secret-select

Calculate LineEdit selection with secret character
parents ae68c335 395a038c
......@@ -1093,7 +1093,11 @@ void LineEdit::set_cursor_at_pixel_pos(int p_x) {
int char_w = 0;
if (font != NULL) {
char_w = font->get_char_size(text[ofs]).width;
if (is_secret()) {
char_w = font->get_char_size(secret_character[0]).width;
} else {
char_w = font->get_char_size(text[ofs]).width;
}
}
pixel_ofs += char_w;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment