diff options
author | Jakob Bouchard <24767889+jakobbouchard@users.noreply.github.com> | 2022-02-16 09:17:55 -0500 |
---|---|---|
committer | Jakob Bouchard <24767889+jakobbouchard@users.noreply.github.com> | 2022-02-16 13:03:05 -0500 |
commit | 6553f5c242865f9aadbe2fdab6db6876c44ac472 (patch) | |
tree | dbd6922a056a26a57fe0b62551bbfabed512fd99 /modules/navigation | |
parent | 98b97d34df7f3ab2cafc3847358c231c3d357b40 (diff) |
Convert _notification methods to switch - Chunk C
Diffstat (limited to 'modules/navigation')
-rw-r--r-- | modules/navigation/navigation_mesh_editor_plugin.cpp | 10 | ||||
-rw-r--r-- | modules/navigation/navigation_mesh_editor_plugin.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/modules/navigation/navigation_mesh_editor_plugin.cpp b/modules/navigation/navigation_mesh_editor_plugin.cpp index 04eca5fb0b..511490ba07 100644 --- a/modules/navigation/navigation_mesh_editor_plugin.cpp +++ b/modules/navigation/navigation_mesh_editor_plugin.cpp @@ -46,10 +46,12 @@ void NavigationMeshEditor::_node_removed(Node *p_node) { } } -void NavigationMeshEditor::_notification(int p_option) { - if (p_option == NOTIFICATION_ENTER_TREE) { - button_bake->set_icon(get_theme_icon(SNAME("Bake"), SNAME("EditorIcons"))); - button_reset->set_icon(get_theme_icon(SNAME("Reload"), SNAME("EditorIcons"))); +void NavigationMeshEditor::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_ENTER_TREE: { + button_bake->set_icon(get_theme_icon(SNAME("Bake"), SNAME("EditorIcons"))); + button_reset->set_icon(get_theme_icon(SNAME("Reload"), SNAME("EditorIcons"))); + } break; } } diff --git a/modules/navigation/navigation_mesh_editor_plugin.h b/modules/navigation/navigation_mesh_editor_plugin.h index 0e4175eca0..d581b453b3 100644 --- a/modules/navigation/navigation_mesh_editor_plugin.h +++ b/modules/navigation/navigation_mesh_editor_plugin.h @@ -57,7 +57,7 @@ class NavigationMeshEditor : public Control { protected: void _node_removed(Node *p_node); static void _bind_methods(); - void _notification(int p_option); + void _notification(int p_what); public: void edit(NavigationRegion3D *p_nav_region); |