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:
@@ -55,7 +55,7 @@ void BoxContainer::_resort() {
|
||||
|
||||
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;
|
||||
@@ -108,7 +108,7 @@ void BoxContainer::_resort() {
|
||||
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;
|
||||
@@ -164,7 +164,7 @@ void BoxContainer::_resort() {
|
||||
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;
|
||||
@@ -227,7 +227,7 @@ Size2 BoxContainer::get_minimum_size() const {
|
||||
if (c->is_set_as_toplevel())
|
||||
continue;
|
||||
|
||||
if (c->is_hidden()) {
|
||||
if (!c->is_visible()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user