summaryrefslogtreecommitdiffstats
path: root/scene/gui/option_button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/option_button.cpp')
-rw-r--r--scene/gui/option_button.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 6488d6ce0a..39ceb06ef9 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -309,9 +309,6 @@ void OptionButton::get_translatable_strings(List<String> *p_strings) const {
void OptionButton::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_selected"), &OptionButton::_selected);
- ClassDB::bind_method(D_METHOD("_focused"), &OptionButton::_focused);
-
ClassDB::bind_method(D_METHOD("add_item", "label", "id"), &OptionButton::add_item, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("add_icon_item", "texture", "label", "id"), &OptionButton::add_icon_item, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("set_item_text", "idx", "text"), &OptionButton::set_item_text);
@@ -363,8 +360,8 @@ OptionButton::OptionButton() {
popup->set_pass_on_modal_close_click(false);
popup->set_notify_transform(true);
popup->set_allow_search(true);
- popup->connect_compat("index_pressed", this, "_selected");
- popup->connect_compat("id_focused", this, "_focused");
+ popup->connect("index_pressed", callable_mp(this, &OptionButton::_selected));
+ popup->connect("id_focused", callable_mp(this, &OptionButton::_focused));
popup->connect_compat("popup_hide", this, "set_pressed", varray(false));
}