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
This commit is contained in:
Juan Linietsky
2017-01-13 10:45:50 -03:00
parent a2903fc51d
commit 04c749a1f0
72 changed files with 252 additions and 292 deletions

View File

@ -43,7 +43,7 @@ Size2 PanelContainer::get_minimum_size() const {
for(int i=0;i<get_child_count();i++) {
Control *c = get_child(i)->cast_to<Control>();
if (!c || !c->is_visible())
if (!c || !c->is_visible_in_tree())
continue;
if (c->is_set_as_toplevel())
continue;
@ -98,7 +98,7 @@ void PanelContainer::_notification(int p_what) {
for(int i=0;i<get_child_count();i++) {
Control *c = get_child(i)->cast_to<Control>();
if (!c || !c->is_visible())
if (!c || !c->is_visible_in_tree())
continue;
if (c->is_set_as_toplevel())
continue;