feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -44,6 +44,8 @@ void LinkButton::_shape() {
|
|||
}
|
||||
TS->shaped_text_set_bidi_override(text_buf->get_rid(), structured_text_parser(st_parser, st_args, xl_text));
|
||||
text_buf->add_string(xl_text, font, font_size, language);
|
||||
|
||||
queue_accessibility_update();
|
||||
}
|
||||
|
||||
void LinkButton::set_text(const String &p_text) {
|
||||
|
|
@ -109,7 +111,10 @@ String LinkButton::get_language() const {
|
|||
}
|
||||
|
||||
void LinkButton::set_uri(const String &p_uri) {
|
||||
uri = p_uri;
|
||||
if (uri != p_uri) {
|
||||
uri = p_uri;
|
||||
queue_accessibility_update();
|
||||
}
|
||||
}
|
||||
|
||||
String LinkButton::get_uri() const {
|
||||
|
|
@ -147,6 +152,17 @@ Size2 LinkButton::get_minimum_size() const {
|
|||
|
||||
void LinkButton::_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_role(ae, DisplayServer::AccessibilityRole::ROLE_LINK);
|
||||
if (!xl_text.is_empty() && get_accessibility_name().is_empty()) {
|
||||
DisplayServer::get_singleton()->accessibility_update_set_name(ae, xl_text);
|
||||
}
|
||||
DisplayServer::get_singleton()->accessibility_update_set_url(ae, uri);
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||
xl_text = atr(text);
|
||||
_shape();
|
||||
|
|
@ -288,7 +304,7 @@ void LinkButton::_bind_methods() {
|
|||
|
||||
LinkButton::LinkButton(const String &p_text) {
|
||||
text_buf.instantiate();
|
||||
set_focus_mode(FOCUS_NONE);
|
||||
set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
set_default_cursor_shape(CURSOR_POINTING_HAND);
|
||||
|
||||
set_text(p_text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue