feat: updated engine

This commit is contained in:
Sara Gerretsen 2026-07-10 17:04:34 +02:00
parent cbe99774ff
commit f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions

View file

@ -30,9 +30,12 @@
#include "text_server_extension.h"
#include "core/object/class_db.h" // IWYU pragma: keep. `GDVIRTUAL_BIND` macro.
void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_has_feature, "feature");
GDVIRTUAL_BIND(_get_name);
GDVIRTUAL_BIND(_get_short_name);
GDVIRTUAL_BIND(_get_features);
GDVIRTUAL_BIND(_free_rid, "rid");
@ -113,6 +116,14 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_font_set_modulate_color_glyphs, "font_rid", "modulate");
GDVIRTUAL_BIND(_font_is_modulate_color_glyphs, "font_rid");
GDVIRTUAL_BIND(_font_get_palette_count, "font_rid");
GDVIRTUAL_BIND(_font_get_palette_name, "font_rid", "index");
GDVIRTUAL_BIND(_font_get_palette_colors, "font_rid", "index");
GDVIRTUAL_BIND(_font_set_palette_custom_colors, "font_rid", "colors");
GDVIRTUAL_BIND(_font_get_palette_custom_colors, "font_rid");
GDVIRTUAL_BIND(_font_get_used_palette, "font_rid");
GDVIRTUAL_BIND(_font_set_used_palette, "font_rid", "index");
GDVIRTUAL_BIND(_font_set_hinting, "font_rid", "hinting");
GDVIRTUAL_BIND(_font_get_hinting, "font_rid");
@ -345,7 +356,7 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_shaped_text_get_dominant_direction_in_range, "shaped", "start", "end");
GDVIRTUAL_BIND(_shaped_text_get_carets, "shaped", "position", "caret");
GDVIRTUAL_BIND(_shaped_text_get_carets, "shaped", "position", "r_caret");
GDVIRTUAL_BIND(_shaped_text_get_selection, "shaped", "start", "end");
GDVIRTUAL_BIND(_shaped_text_hit_test_grapheme, "shaped", "coord");
@ -404,6 +415,16 @@ String TextServerExtension::get_name() const {
return ret;
}
String TextServerExtension::get_short_name() const {
String ret = "unknown";
GDVIRTUAL_CALL(_get_short_name, ret);
if (ret == "unknown") {
// Fall back to a simplified version of the full name if not overridden.
ret = get_name().to_lower().replace_char(' ', '_');
}
return ret;
}
int64_t TextServerExtension::get_features() const {
int64_t ret = 0;
GDVIRTUAL_CALL(_get_features, ret);
@ -688,6 +709,43 @@ bool TextServerExtension::font_is_modulate_color_glyphs(const RID &p_font_rid) c
return ret;
}
int64_t TextServerExtension::font_get_palette_count(const RID &p_font_rid) const {
int64_t ret = 0;
GDVIRTUAL_CALL(_font_get_palette_count, p_font_rid, ret);
return ret;
}
String TextServerExtension::font_get_palette_name(const RID &p_font_rid, int64_t p_index) const {
String ret;
GDVIRTUAL_CALL(_font_get_palette_name, p_font_rid, p_index, ret);
return ret;
}
Vector<Color> TextServerExtension::font_get_palette_colors(const RID &p_font_rid, int64_t p_index) const {
Vector<Color> ret;
GDVIRTUAL_CALL(_font_get_palette_colors, p_font_rid, p_index, ret);
return ret;
}
void TextServerExtension::font_set_palette_custom_colors(const RID &p_font_rid, const Vector<Color> &p_colors) {
GDVIRTUAL_CALL(_font_set_palette_custom_colors, p_font_rid, p_colors);
}
Vector<Color> TextServerExtension::font_get_palette_custom_colors(const RID &p_font_rid) const {
Vector<Color> ret;
GDVIRTUAL_CALL(_font_get_palette_custom_colors, p_font_rid, ret);
return ret;
}
int64_t TextServerExtension::font_get_used_palette(const RID &p_font_rid) const {
int64_t ret = 0;
GDVIRTUAL_CALL(_font_get_used_palette, p_font_rid, ret);
return ret;
}
void TextServerExtension::font_set_used_palette(const RID &p_font_rid, int64_t p_index) {
GDVIRTUAL_CALL(_font_set_used_palette, p_font_rid, p_index);
}
void TextServerExtension::font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {
GDVIRTUAL_CALL(_font_set_hinting, p_font_rid, p_hinting);
}