Base accessibility API.

This commit is contained in:
Pāvels Nadtočajevs 2025-03-21 16:42:23 +02:00
parent af2c713971
commit b106dfd4f9
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
124 changed files with 7631 additions and 181 deletions

View file

@ -35,6 +35,7 @@ void TextLine::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_direction", "direction"), &TextLine::set_direction);
ClassDB::bind_method(D_METHOD("get_direction"), &TextLine::get_direction);
ClassDB::bind_method(D_METHOD("get_inferred_direction"), &TextLine::get_inferred_direction);
ADD_PROPERTY(PropertyInfo(Variant::INT, "direction", PROPERTY_HINT_ENUM, "Auto,Left-to-right,Right-to-left"), "set_direction", "get_direction");
@ -200,6 +201,10 @@ TextServer::Direction TextLine::get_direction() const {
return TS->shaped_text_get_direction(rid);
}
TextServer::Direction TextLine::get_inferred_direction() const {
return TS->shaped_text_get_inferred_direction(rid);
}
void TextLine::set_orientation(TextServer::Orientation p_orientation) {
TS->shaped_text_set_orientation(rid, p_orientation);
dirty = true;