mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Convert _notification methods to switch - Chunk C
This commit is contained in:
parent
98b97d34df
commit
6553f5c242
37 changed files with 378 additions and 327 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue