summaryrefslogtreecommitdiffstats
path: root/scene/gui/menu_button.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-21 23:26:13 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-02-28 14:24:09 +0100
commitf742dabafee7f54e1b77148d547e2031d7cc535e (patch)
tree5aab3c9c4b9aca10d190a7efa600afb8c7aef213 /scene/gui/menu_button.cpp
parent01afc442c73661df677c2b93f4037a21992ee45b (diff)
downloadredot-engine-f742dabafee7f54e1b77148d547e2031d7cc535e.tar.gz
Signals: Manually port most of remaining connect_compat uses
It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
Diffstat (limited to 'scene/gui/menu_button.cpp')
-rw-r--r--scene/gui/menu_button.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index a211ee02ed..2b163187c5 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "menu_button.h"
+
#include "core/os/keyboard.h"
#include "scene/main/viewport.h"
@@ -137,8 +138,8 @@ MenuButton::MenuButton() {
popup->hide();
add_child(popup);
popup->set_pass_on_modal_close_click(false);
- popup->connect_compat("about_to_show", this, "set_pressed", varray(true)); // For when switching from another MenuButton.
- popup->connect_compat("popup_hide", this, "set_pressed", varray(false));
+ popup->connect("about_to_show", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(true)); // For when switching from another MenuButton.
+ popup->connect("popup_hide", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(false));
}
MenuButton::~MenuButton() {