summaryrefslogtreecommitdiffstats
path: root/modules/gdnative/text/text_server_gdnative.cpp
diff options
context:
space:
mode:
authorHendrik Brucker <hendrik.brucker@mail.de>2021-07-04 16:43:55 +0200
committerHendrik Brucker <hendrik.brucker@mail.de>2021-07-04 16:43:55 +0200
commit56a8d3f30c09fdc03b19ef48a97d344ffe2df974 (patch)
treef3be955afcbb70de9d3afcd8a462ff7cecc980ce /modules/gdnative/text/text_server_gdnative.cpp
parentcb4e42155dd3a0e513106d7a219366dd355e9483 (diff)
downloadredot-engine-56a8d3f30c09fdc03b19ef48a97d344ffe2df974.tar.gz
Improvements to Label's layout options
- Added options to trim the text in case it overruns - Added more autowrap modes - Improved line breaking, which ignores trailing spaces
Diffstat (limited to 'modules/gdnative/text/text_server_gdnative.cpp')
-rw-r--r--modules/gdnative/text/text_server_gdnative.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gdnative/text/text_server_gdnative.cpp b/modules/gdnative/text/text_server_gdnative.cpp
index bc4b1ac134..392121c3a9 100644
--- a/modules/gdnative/text/text_server_gdnative.cpp
+++ b/modules/gdnative/text/text_server_gdnative.cpp
@@ -498,6 +498,11 @@ bool TextServerGDNative::shaped_text_update_justification_ops(RID p_shaped) {
return interface->shaped_text_update_justification_ops(data, (godot_rid *)&p_shaped);
}
+void TextServerGDNative::shaped_text_overrun_trim_to_width(RID p_shaped_line, float p_width, uint8_t p_clip_flags) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->shaped_text_overrun_trim_to_width(data, (godot_rid *)&p_shaped_line, p_width, p_clip_flags);
+};
+
bool TextServerGDNative::shaped_text_is_ready(RID p_shaped) const {
ERR_FAIL_COND_V(interface == nullptr, false);
return interface->shaped_text_is_ready(data, (godot_rid *)&p_shaped);