@@ -400,24 +400,24 @@ String TreeItem::get_text(int p_column) const {
400400 return cells[p_column].text ;
401401}
402402
403- void TreeItem::set_alt_text (int p_column, String p_text) {
403+ void TreeItem::set_description (int p_column, String p_text) {
404404 ERR_FAIL_INDEX (p_column, cells.size ());
405405
406- if (cells[p_column].alt_text == p_text) {
406+ if (cells[p_column].description == p_text) {
407407 return ;
408408 }
409409
410- cells.write [p_column].alt_text = p_text;
410+ cells.write [p_column].description = p_text;
411411
412412 _changed_notify (p_column);
413413 if (get_tree ()) {
414414 get_tree ()->update_configuration_warnings ();
415415 }
416416}
417417
418- String TreeItem::get_alt_text (int p_column) const {
418+ String TreeItem::get_description (int p_column) const {
419419 ERR_FAIL_INDEX_V (p_column, cells.size (), " " );
420- return cells[p_column].alt_text ;
420+ return cells[p_column].description ;
421421}
422422
423423void TreeItem::set_text_direction (int p_column, Control::TextDirection p_text_direction) {
@@ -1330,7 +1330,7 @@ void TreeItem::clear_buttons() {
13301330 }
13311331}
13321332
1333- void TreeItem::add_button (int p_column, const Ref<Texture2D> &p_button, int p_id, bool p_disabled, const String &p_tooltip, const String &p_alt_text ) {
1333+ void TreeItem::add_button (int p_column, const Ref<Texture2D> &p_button, int p_id, bool p_disabled, const String &p_tooltip, const String &p_description ) {
13341334 ERR_FAIL_INDEX (p_column, cells.size ());
13351335 ERR_FAIL_COND (p_button.is_null ());
13361336 TreeItem::Cell::Button button;
@@ -1341,7 +1341,7 @@ void TreeItem::add_button(int p_column, const Ref<Texture2D> &p_button, int p_id
13411341 button.id = p_id;
13421342 button.disabled = p_disabled;
13431343 button.tooltip = p_tooltip;
1344- button.alt_text = p_alt_text ;
1344+ button.description = p_description ;
13451345 cells.write [p_column].buttons .push_back (button);
13461346 cells.write [p_column].cached_minimum_size_dirty = true ;
13471347
@@ -1427,15 +1427,15 @@ void TreeItem::set_button(int p_column, int p_index, const Ref<Texture2D> &p_but
14271427 _changed_notify (p_column);
14281428}
14291429
1430- void TreeItem::set_button_alt_text (int p_column, int p_index, const String &p_alt_text ) {
1430+ void TreeItem::set_button_description (int p_column, int p_index, const String &p_description ) {
14311431 ERR_FAIL_INDEX (p_column, cells.size ());
14321432 ERR_FAIL_INDEX (p_index, cells[p_column].buttons .size ());
14331433
1434- if (cells[p_column].buttons [p_index].alt_text == p_alt_text ) {
1434+ if (cells[p_column].buttons [p_index].description == p_description ) {
14351435 return ;
14361436 }
14371437
1438- cells.write [p_column].buttons .write [p_index].alt_text = p_alt_text ;
1438+ cells.write [p_column].buttons .write [p_index].description = p_description ;
14391439 _changed_notify (p_column);
14401440 if (get_tree ()) {
14411441 get_tree ()->update_configuration_warnings ();
@@ -1775,8 +1775,8 @@ void TreeItem::_bind_methods() {
17751775 ClassDB::bind_method (D_METHOD (" set_text" , " column" , " text" ), &TreeItem::set_text);
17761776 ClassDB::bind_method (D_METHOD (" get_text" , " column" ), &TreeItem::get_text);
17771777
1778- ClassDB::bind_method (D_METHOD (" set_alt_text " , " column" , " text " ), &TreeItem::set_alt_text );
1779- ClassDB::bind_method (D_METHOD (" get_alt_text " , " column" ), &TreeItem::get_alt_text );
1778+ ClassDB::bind_method (D_METHOD (" set_description " , " column" , " description " ), &TreeItem::set_description );
1779+ ClassDB::bind_method (D_METHOD (" get_description " , " column" ), &TreeItem::get_description );
17801780
17811781 ClassDB::bind_method (D_METHOD (" set_text_direction" , " column" , " direction" ), &TreeItem::set_text_direction);
17821782 ClassDB::bind_method (D_METHOD (" get_text_direction" , " column" ), &TreeItem::get_text_direction);
@@ -1871,7 +1871,7 @@ void TreeItem::_bind_methods() {
18711871 ClassDB::bind_method (D_METHOD (" is_custom_set_as_button" , " column" ), &TreeItem::is_custom_set_as_button);
18721872
18731873 ClassDB::bind_method (D_METHOD (" clear_buttons" ), &TreeItem::clear_buttons);
1874- ClassDB::bind_method (D_METHOD (" add_button" , " column" , " button" , " id" , " disabled" , " tooltip_text" , " alt_text " ), &TreeItem::add_button, DEFVAL (-1 ), DEFVAL (false ), DEFVAL (" " ), DEFVAL (" " ));
1874+ ClassDB::bind_method (D_METHOD (" add_button" , " column" , " button" , " id" , " disabled" , " tooltip_text" , " description " ), &TreeItem::add_button, DEFVAL (-1 ), DEFVAL (false ), DEFVAL (" " ), DEFVAL (" " ));
18751875 ClassDB::bind_method (D_METHOD (" get_button_count" , " column" ), &TreeItem::get_button_count);
18761876 ClassDB::bind_method (D_METHOD (" get_button_tooltip_text" , " column" , " button_index" ), &TreeItem::get_button_tooltip_text);
18771877 ClassDB::bind_method (D_METHOD (" get_button_id" , " column" , " button_index" ), &TreeItem::get_button_id);
@@ -1881,7 +1881,7 @@ void TreeItem::_bind_methods() {
18811881 ClassDB::bind_method (D_METHOD (" set_button_tooltip_text" , " column" , " button_index" , " tooltip" ), &TreeItem::set_button_tooltip_text);
18821882 ClassDB::bind_method (D_METHOD (" set_button" , " column" , " button_index" , " button" ), &TreeItem::set_button);
18831883 ClassDB::bind_method (D_METHOD (" erase_button" , " column" , " button_index" ), &TreeItem::erase_button);
1884- ClassDB::bind_method (D_METHOD (" set_button_alt_text " , " column" , " button_index" , " alt_text " ), &TreeItem::set_button_alt_text );
1884+ ClassDB::bind_method (D_METHOD (" set_button_description " , " column" , " button_index" , " description " ), &TreeItem::set_button_description );
18851885 ClassDB::bind_method (D_METHOD (" set_button_disabled" , " column" , " button_index" , " disabled" ), &TreeItem::set_button_disabled);
18861886 ClassDB::bind_method (D_METHOD (" set_button_color" , " column" , " button_index" , " color" ), &TreeItem::set_button_color);
18871887 ClassDB::bind_method (D_METHOD (" is_button_disabled" , " column" , " button_index" ), &TreeItem::is_button_disabled);
@@ -4538,11 +4538,11 @@ int Tree::_get_title_button_height() const {
45384538void Tree::_check_item_accessibility (TreeItem *p_item, PackedStringArray &r_warnings, int &r_row) const {
45394539 for (int i = 0 ; i < p_item->cells .size (); i++) {
45404540 const TreeItem::Cell &cell = p_item->cells [i];
4541- if (cell.alt_text .strip_edges ().is_empty () && cell.text .strip_edges ().is_empty ()) {
4541+ if (cell.description .strip_edges ().is_empty () && cell.text .strip_edges ().is_empty ()) {
45424542 r_warnings.push_back (vformat (RTR (" Cell %d x %d: either text or alternative text must not be empty." ), r_row, i));
45434543 }
45444544 for (int j = 0 ; j < cell.buttons .size (); j++) {
4545- if (cell.buttons [j].alt_text .strip_edges ().is_empty ()) {
4545+ if (cell.buttons [j].description .strip_edges ().is_empty ()) {
45464546 r_warnings.push_back (vformat (RTR (" Button %d in %d x %d: alternative text must not be empty." ), j, r_row, i));
45474547 }
45484548 }
@@ -4732,10 +4732,10 @@ void Tree::_accessibility_update_item(Point2 &r_ofs, TreeItem *p_item, int &r_ro
47324732
47334733 DisplayServer::get_singleton ()->accessibility_update_set_table_cell_position (cell.accessibility_cell_element , r_row, i);
47344734 DisplayServer::get_singleton ()->accessibility_update_set_list_item_selected (cell.accessibility_cell_element , cell.selected );
4735- if (cell.alt_text .is_empty ()) {
4735+ if (cell.description .is_empty ()) {
47364736 DisplayServer::get_singleton ()->accessibility_update_set_name (cell.accessibility_cell_element , cell.xl_text );
47374737 } else {
4738- DisplayServer::get_singleton ()->accessibility_update_set_name (cell.accessibility_cell_element , cell.alt_text );
4738+ DisplayServer::get_singleton ()->accessibility_update_set_name (cell.accessibility_cell_element , cell.description );
47394739 }
47404740
47414741 DisplayServer::get_singleton ()->accessibility_update_set_text_align (cell.accessibility_cell_element , cell.text_alignment );
@@ -4784,10 +4784,10 @@ void Tree::_accessibility_update_item(Point2 &r_ofs, TreeItem *p_item, int &r_ro
47844784 DisplayServer::get_singleton ()->accessibility_update_add_action (cell.buttons [j].accessibility_button_element , DisplayServer::AccessibilityAction::ACTION_CLICK, callable_mp (this , &Tree::_accessibility_action_button_press).bind (p_item, i, j));
47854785 DisplayServer::get_singleton ()->accessibility_update_set_flag (cell.buttons [j].accessibility_button_element , DisplayServer::AccessibilityFlags::FLAG_DISABLED, cell.buttons [j].disabled );
47864786 DisplayServer::get_singleton ()->accessibility_update_set_tooltip (cell.buttons [j].accessibility_button_element , cell.buttons [j].tooltip );
4787- if (cell.buttons [j].alt_text .is_empty ()) {
4787+ if (cell.buttons [j].description .is_empty ()) {
47884788 DisplayServer::get_singleton ()->accessibility_update_set_name (cell.buttons [j].accessibility_button_element , cell.buttons [j].tooltip );
47894789 } else {
4790- DisplayServer::get_singleton ()->accessibility_update_set_name (cell.buttons [j].accessibility_button_element , cell.buttons [j].alt_text );
4790+ DisplayServer::get_singleton ()->accessibility_update_set_name (cell.buttons [j].accessibility_button_element , cell.buttons [j].description );
47914791 }
47924792
47934793 Ref<Texture2D> b = cell.buttons [j].texture ;
0 commit comments