summaryrefslogtreecommitdiffstats
path: root/scene/gui/option_button.cpp
diff options
context:
space:
mode:
authorZak Grumbles <zakgrumbles@gmail.com>2020-03-25 12:07:18 -0500
committerZak Grumbles <zakgrumbles@gmail.com>2020-04-10 20:35:40 -0500
commita8de034f78198ba13fa7455d78e2ca31bb8b9f5f (patch)
treec535896c243e007eabe7a9f18be3e01627c4eaa9 /scene/gui/option_button.cpp
parent8806e7d5f3e65a06be1b0a58dc73442e58fdf469 (diff)
downloadredot-engine-a8de034f78198ba13fa7455d78e2ca31bb8b9f5f.tar.gz
Fix OptionButton docs godotengine#36803
* item_selected and item_focused docs incorrectly had 'id' as the parameter. Changed to 'index'. * Fix parameter name in ADD_SIGNAL callin code.
Diffstat (limited to 'scene/gui/option_button.cpp')
-rw-r--r--scene/gui/option_button.cpp4
1 files changed, 2 insertions, 2 deletions
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() {