diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 0626df04141..7263687ea81 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -381,7 +381,7 @@ The scale of icon applied after [member fixed_icon_size] and transposing takes effect. - + The number of items currently in the list. diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 93f514cc63b..b0774d4cab6 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -30,7 +30,7 @@ - + The number of items currently in the list. diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index b377b186f63..0307277da56 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -505,7 +505,7 @@ If [code]true[/code], hides the [PopupMenu] when a state item is selected. - + The number of items currently in the list. diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs index 0d2f3f32e9e..56fca6b5cb0 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs @@ -119,7 +119,7 @@ namespace GodotTools.Build private void IssueActivated(int idx) { - if (idx < 0 || idx >= _issuesList.ItemsCount) + if (idx < 0 || idx >= _issuesList.ItemCount) throw new IndexOutOfRangeException("Item list index out of range"); // Get correct issue idx from issue list @@ -193,7 +193,7 @@ namespace GodotTools.Build string itemText = lineBreakIdx == -1 ? text : text.Substring(0, lineBreakIdx); _issuesList.AddItem(itemText, issue.Warning ? warningIcon : errorIcon); - int index = _issuesList.ItemsCount - 1; + int index = _issuesList.ItemCount - 1; _issuesList.SetItemTooltip(index, tooltip); _issuesList.SetItemMetadata(index, i); } @@ -348,7 +348,7 @@ namespace GodotTools.Build label: "Copy Error".TTR(), (int)IssuesContextMenuOption.Copy); } - if (_issuesListContextMenu.ItemsCount > 0) + if (_issuesListContextMenu.ItemCount > 0) { _issuesListContextMenu.Position = (Vector2i)(_issuesList.RectGlobalPosition + atPosition); _issuesListContextMenu.Popup(); diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 93859cd4d6d..857058f94ea 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1663,7 +1663,7 @@ void ItemList::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "max_text_lines", PROPERTY_HINT_RANGE, "1,10,1,or_greater"), "set_max_text_lines", "get_max_text_lines"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_height"), "set_auto_height", "has_auto_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "text_overrun_behavior", PROPERTY_HINT_ENUM, "Trim Nothing,Trim Characters,Trim Words,Ellipsis,Word Ellipsis"), "set_text_overrun_behavior", "get_text_overrun_behavior"); - ADD_ARRAY_COUNT("Items", "items_count", "set_item_count", "get_item_count", "item_"); + ADD_ARRAY_COUNT("Items", "item_count", "set_item_count", "get_item_count", "item_"); ADD_GROUP("Columns", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_columns", PROPERTY_HINT_RANGE, "0,10,1,or_greater"), "set_max_columns", "get_max_columns"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "same_column_width"), "set_same_column_width", "is_same_column_width"); diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 39c7b04955a..32501b65a02 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -207,7 +207,7 @@ void MenuButton::_bind_methods() { ClassDB::bind_method(D_METHOD("get_item_count"), &MenuButton::get_item_count); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "switch_on_hover"), "set_switch_on_hover", "is_switch_on_hover"); - ADD_ARRAY_COUNT("Items", "items_count", "set_item_count", "get_item_count", "popup/item_"); + ADD_ARRAY_COUNT("Items", "item_count", "set_item_count", "get_item_count", "popup/item_"); ADD_SIGNAL(MethodInfo("about_to_popup")); } diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e67b54eaf9d..d2062a66f92 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1762,7 +1762,7 @@ void PopupMenu::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "submenu_popup_delay"), "set_submenu_popup_delay", "get_submenu_popup_delay"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_search"), "set_allow_search", "get_allow_search"); - ADD_ARRAY_COUNT("Items", "items_count", "set_item_count", "get_item_count", "item_"); + ADD_ARRAY_COUNT("Items", "item_count", "set_item_count", "get_item_count", "item_"); ADD_SIGNAL(MethodInfo("id_pressed", PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("id_focused", PropertyInfo(Variant::INT, "id")));