diff options
| author | Juan Linietsky | 2017-01-13 10:45:50 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-01-13 10:45:50 -0300 |
| commit | 04c749a1f034c0b2256fdca0ca2675f696b490e8 (patch) | |
| tree | c908a64edf3f61bba725051c8f60c6a108acbb84 /tools/editor/plugins/tile_map_editor_plugin.cpp | |
| parent | a2903fc51d1d20eba4dc451bdacbe477d6670163 (diff) | |
| download | godot-04c749a1f034c0b2256fdca0ca2675f696b490e8.tar.gz godot-04c749a1f034c0b2256fdca0ca2675f696b490e8.tar.zst godot-04c749a1f034c0b2256fdca0ca2675f696b490e8.zip | |
New API for visibility in both CanvasItem and Spatial
visible (property) - access set_visible(bool) is_visible()
is_visible_in_tree() - true when visible and parents visible
show() hide() - for convenience
Diffstat (limited to 'tools/editor/plugins/tile_map_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/tile_map_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp index 2c64f7cd8..1a8c35a0b 100644 --- a/tools/editor/plugins/tile_map_editor_plugin.cpp +++ b/tools/editor/plugins/tile_map_editor_plugin.cpp @@ -53,7 +53,7 @@ void TileMapEditor::_notification(int p_what) { } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - if (is_visible()) { + if (is_visible_in_tree()) { _update_palette(); } } break; @@ -597,7 +597,7 @@ static inline Vector<Point2i> line(int x0, int x1, int y0, int y1) { bool TileMapEditor::forward_gui_input(const InputEvent& p_event) { - if (!node || !node->get_tileset().is_valid() || !node->is_visible()) + if (!node || !node->get_tileset().is_valid() || !node->is_visible_in_tree()) return false; Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * node->get_global_transform(); |
