1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Convert _notification methods to switch - Chunk C

This commit is contained in:
Jakob Bouchard
2022-02-16 09:17:55 -05:00
parent 98b97d34df
commit 6553f5c242
37 changed files with 378 additions and 327 deletions

View File

@@ -35,12 +35,14 @@
#include "scene/gui/label.h"
void ReparentDialog::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
connect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
}
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
} break;
if (p_what == NOTIFICATION_EXIT_TREE) {
disconnect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
} break;
}
}