diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-04-11 08:30:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-11 08:30:43 +0200 |
commit | 4bb3f9d4b94f48b503b34886a1b7ffb682b1fbcd (patch) | |
tree | c535896c243e007eabe7a9f18be3e01627c4eaa9 | |
parent | 8806e7d5f3e65a06be1b0a58dc73442e58fdf469 (diff) | |
parent | a8de034f78198ba13fa7455d78e2ca31bb8b9f5f (diff) |
Merge pull request #37303 from zak-grumbles/fix-option-btn-item-selected-docs
Fix OptionButton item_selected docs godotengine#36803
-rw-r--r-- | doc/classes/OptionButton.xml | 4 | ||||
-rw-r--r-- | scene/gui/option_button.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 5cb2aaf314..39d974ec47 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -214,14 +214,14 @@ </members> <signals> <signal name="item_focused"> - <argument index="0" name="id" type="int"> + <argument index="0" name="index" type="int"> </argument> <description> Emitted the when user navigates to an item using the [code]ui_up[/code] or [code]ui_down[/code] actions. The index of the item selected is passed as argument. </description> </signal> <signal name="item_selected"> - <argument index="0" name="id" type="int"> + <argument index="0" name="index" type="int"> </argument> <description> Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index 30ecd651b1..a03d6d0cdc 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -340,8 +340,8 @@ void OptionButton::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items"); // "selected" property must come after "items", otherwise GH-10213 occurs. ADD_PROPERTY(PropertyInfo(Variant::INT, "selected"), "_select_int", "get_selected"); - ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "id"))); - ADD_SIGNAL(MethodInfo("item_focused", PropertyInfo(Variant::INT, "id"))); + ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "index"))); + ADD_SIGNAL(MethodInfo("item_focused", PropertyInfo(Variant::INT, "index"))); } OptionButton::OptionButton() { |