Add methods to get position from column and line in TextEdit
This commit is contained in:
parent
835f4dedaf
commit
e85e6ec7fc
9 changed files with 160 additions and 9 deletions
|
|
@ -260,6 +260,7 @@ void TextServerExtension::_bind_methods() {
|
|||
GDVIRTUAL_BIND(_shaped_text_draw, "shaped", "canvas", "pos", "clip_l", "clip_r", "color");
|
||||
GDVIRTUAL_BIND(_shaped_text_draw_outline, "shaped", "canvas", "pos", "clip_l", "clip_r", "outline_size", "color");
|
||||
|
||||
GDVIRTUAL_BIND(_shaped_text_get_grapheme_bounds, "shaped", "pos");
|
||||
GDVIRTUAL_BIND(_shaped_text_next_grapheme_pos, "shaped", "pos");
|
||||
GDVIRTUAL_BIND(_shaped_text_prev_grapheme_pos, "shaped", "pos");
|
||||
|
||||
|
|
@ -1292,6 +1293,14 @@ void TextServerExtension::shaped_text_draw_outline(RID p_shaped, RID p_canvas, c
|
|||
shaped_text_draw_outline(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color);
|
||||
}
|
||||
|
||||
Vector2 TextServerExtension::shaped_text_get_grapheme_bounds(RID p_shaped, int p_pos) const {
|
||||
Vector2 ret;
|
||||
if (GDVIRTUAL_CALL(_shaped_text_get_grapheme_bounds, p_shaped, p_pos, ret)) {
|
||||
return ret;
|
||||
}
|
||||
return TextServer::shaped_text_get_grapheme_bounds(p_shaped, p_pos);
|
||||
}
|
||||
|
||||
int TextServerExtension::shaped_text_next_grapheme_pos(RID p_shaped, int p_pos) const {
|
||||
int ret;
|
||||
if (GDVIRTUAL_CALL(_shaped_text_next_grapheme_pos, p_shaped, p_pos, ret)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue