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 ColorRect::set_color(const Color &p_color) {
return;
}
color = p_color;
queue_accessibility_update();
queue_redraw();
}
@ -44,6 +45,13 @@ Color ColorRect::get_color() const {
void ColorRect::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ACCESSIBILITY_UPDATE: {
RID ae = get_accessibility_element();
ERR_FAIL_COND(ae.is_null());
DisplayServer::get_singleton()->accessibility_update_set_color_value(ae, color);
} break;
case NOTIFICATION_DRAW: {
draw_rect(Rect2(Point2(), get_size()), color);
} break;