summaryrefslogtreecommitdiff
path: root/editor/plugins/texture_layered_editor_plugin.cpp
diff options
context:
space:
mode:
authorJakob Bouchard <24767889+jakobbouchard@users.noreply.github.com>2022-02-16 09:17:55 -0500
committerJakob Bouchard <24767889+jakobbouchard@users.noreply.github.com>2022-02-16 13:03:05 -0500
commit6553f5c242865f9aadbe2fdab6db6876c44ac472 (patch)
treedbd6922a056a26a57fe0b62551bbfabed512fd99 /editor/plugins/texture_layered_editor_plugin.cpp
parent98b97d34df7f3ab2cafc3847358c231c3d357b40 (diff)
Convert _notification methods to switch - Chunk C
Diffstat (limited to 'editor/plugins/texture_layered_editor_plugin.cpp')
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index 22f4cebf2e..cb146fd342 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -46,18 +46,17 @@ void TextureLayeredEditor::_texture_rect_draw() {
}
void TextureLayeredEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_READY) {
- //get_scene()->connect("node_removed",this,"_node_removed");
- }
- if (p_what == NOTIFICATION_RESIZED) {
- _texture_rect_update_area();
- }
+ switch (p_what) {
+ case NOTIFICATION_RESIZED: {
+ _texture_rect_update_area();
+ } break;
- if (p_what == NOTIFICATION_DRAW) {
- Ref<Texture2D> checkerboard = get_theme_icon(SNAME("Checkerboard"), SNAME("EditorIcons"));
- Size2 size = get_size();
+ case NOTIFICATION_DRAW: {
+ Ref<Texture2D> checkerboard = get_theme_icon(SNAME("Checkerboard"), SNAME("EditorIcons"));
+ Size2 size = get_size();
- draw_texture_rect(checkerboard, Rect2(Point2(), size), true);
+ draw_texture_rect(checkerboard, Rect2(Point2(), size), true);
+ } break;
}
}