mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Fixes differences between docs and item_selected and item_focused signals in optionbutton
Description in docs about item_selected and item_focused signals in optionbutton is fixed to match the real behaviour. Also, get_item_index function is added.
This commit is contained in:
@@ -160,6 +160,12 @@ int OptionButton::get_item_id(int p_idx) const {
|
||||
|
||||
return popup->get_item_id(p_idx);
|
||||
}
|
||||
|
||||
int OptionButton::get_item_index(int p_id) const {
|
||||
|
||||
return popup->get_item_index(p_id);
|
||||
}
|
||||
|
||||
Variant OptionButton::get_item_metadata(int p_idx) const {
|
||||
|
||||
return popup->get_item_metadata(p_idx);
|
||||
@@ -306,6 +312,7 @@ void OptionButton::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_item_text", "idx"), &OptionButton::get_item_text);
|
||||
ClassDB::bind_method(D_METHOD("get_item_icon", "idx"), &OptionButton::get_item_icon);
|
||||
ClassDB::bind_method(D_METHOD("get_item_id", "idx"), &OptionButton::get_item_id);
|
||||
ClassDB::bind_method(D_METHOD("get_item_index", "id"), &OptionButton::get_item_index);
|
||||
ClassDB::bind_method(D_METHOD("get_item_metadata", "idx"), &OptionButton::get_item_metadata);
|
||||
ClassDB::bind_method(D_METHOD("is_item_disabled", "idx"), &OptionButton::is_item_disabled);
|
||||
ClassDB::bind_method(D_METHOD("get_item_count"), &OptionButton::get_item_count);
|
||||
|
||||
Reference in New Issue
Block a user