diff options
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/box_container.cpp | 8 | ||||
-rw-r--r-- | scene/gui/center_container.cpp | 4 | ||||
-rw-r--r-- | scene/gui/color_picker.cpp | 2 | ||||
-rw-r--r-- | scene/gui/control.cpp | 22 | ||||
-rw-r--r-- | scene/gui/dialogs.cpp | 4 | ||||
-rw-r--r-- | scene/gui/graph_edit.cpp | 2 | ||||
-rw-r--r-- | scene/gui/graph_node.cpp | 10 | ||||
-rw-r--r-- | scene/gui/margin_container.cpp | 4 | ||||
-rw-r--r-- | scene/gui/panel_container.cpp | 4 | ||||
-rw-r--r-- | scene/gui/popup.cpp | 4 | ||||
-rw-r--r-- | scene/gui/scroll_container.cpp | 6 | ||||
-rw-r--r-- | scene/gui/split_container.cpp | 2 | ||||
-rw-r--r-- | scene/gui/tab_container.cpp | 4 |
13 files changed, 38 insertions, 38 deletions
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index f130726837..33e030a573 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -57,7 +57,7 @@ void BoxContainer::_resort() { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -111,7 +111,7 @@ void BoxContainer::_resort() { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -172,7 +172,7 @@ void BoxContainer::_resort() { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -224,7 +224,7 @@ Size2 BoxContainer::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/center_container.cpp b/scene/gui/center_container.cpp index f8f9bec3d7..1a72f3ca4d 100644 --- a/scene/gui/center_container.cpp +++ b/scene/gui/center_container.cpp @@ -40,7 +40,7 @@ Size2 CenterContainer::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (!c->is_visible()) { @@ -77,7 +77,7 @@ void CenterContainer::_notification(int p_what) { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index cbe0367c7b..f8a67d154b 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -610,7 +610,7 @@ void ColorPicker::_screen_pick_pressed() { if (!screen) { screen = memnew(Control); r->add_child(screen); - screen->set_as_toplevel(true); + screen->set_as_top_level(true); screen->set_anchors_and_margins_preset(Control::PRESET_WIDE); screen->set_default_cursor_shape(CURSOR_POINTING_HAND); screen->connect("gui_input", callable_mp(this, &ColorPicker::_screen_input)); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 13d7440eb3..4149c25f6b 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -493,7 +493,7 @@ void Control::_notification(int p_notification) { } CanvasItem *ci = Object::cast_to<CanvasItem>(parent); - if (ci && ci->is_set_as_toplevel()) { + if (ci && ci->is_set_as_top_level()) { subwindow = true; break; } @@ -532,7 +532,7 @@ void Control::_notification(int p_notification) { if (data.parent_canvas_item) { data.parent_canvas_item->disconnect("item_rect_changed", callable_mp(this, &Control::_size_changed)); data.parent_canvas_item = nullptr; - } else if (!is_set_as_toplevel()) { + } else if (!is_set_as_top_level()) { //disconnect viewport get_viewport()->disconnect("size_changed", callable_mp(this, &Control::_size_changed)); } @@ -1816,7 +1816,7 @@ void Control::set_focus_mode(FocusMode p_focus_mode) { } static Control *_next_control(Control *p_from) { - if (p_from->is_set_as_toplevel()) { + if (p_from->is_set_as_top_level()) { return nullptr; // can't go above } @@ -1830,7 +1830,7 @@ static Control *_next_control(Control *p_from) { ERR_FAIL_INDEX_V(next, parent->get_child_count(), nullptr); for (int i = (next + 1); i < parent->get_child_count(); i++) { Control *c = Object::cast_to<Control>(parent->get_child(i)); - if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) { + if (!c || !c->is_visible_in_tree() || c->is_set_as_top_level()) { continue; } @@ -1867,7 +1867,7 @@ Control *Control::find_next_valid_focus() const { for (int i = 0; i < from->get_child_count(); i++) { Control *c = Object::cast_to<Control>(from->get_child(i)); - if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) { + if (!c || !c->is_visible_in_tree() || c->is_set_as_top_level()) { continue; } @@ -1879,7 +1879,7 @@ Control *Control::find_next_valid_focus() const { next_child = _next_control(from); if (!next_child) { //nothing else.. go up and find either window or subwindow next_child = const_cast<Control *>(this); - while (next_child && !next_child->is_set_as_toplevel()) { + while (next_child && !next_child->is_set_as_top_level()) { next_child = cast_to<Control>(next_child->get_parent()); } @@ -1915,7 +1915,7 @@ static Control *_prev_control(Control *p_from) { Control *child = nullptr; for (int i = p_from->get_child_count() - 1; i >= 0; i--) { Control *c = Object::cast_to<Control>(p_from->get_child(i)); - if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) { + if (!c || !c->is_visible_in_tree() || c->is_set_as_top_level()) { continue; } @@ -1955,7 +1955,7 @@ Control *Control::find_prev_valid_focus() const { Control *prev_child = nullptr; - if (from->is_set_as_toplevel() || !Object::cast_to<Control>(from->get_parent())) { + if (from->is_set_as_top_level() || !Object::cast_to<Control>(from->get_parent())) { //find last of the children prev_child = _prev_control(from); @@ -1964,7 +1964,7 @@ Control *Control::find_prev_valid_focus() const { for (int i = (from->get_index() - 1); i >= 0; i--) { Control *c = Object::cast_to<Control>(from->get_parent()->get_child(i)); - if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) { + if (!c || !c->is_visible_in_tree() || c->is_set_as_top_level()) { continue; } @@ -2024,7 +2024,7 @@ void Control::release_focus() { } bool Control::is_toplevel_control() const { - return is_inside_tree() && (!data.parent_canvas_item && !data.RI && is_set_as_toplevel()); + return is_inside_tree() && (!data.parent_canvas_item && !data.RI && is_set_as_top_level()); } void Control::_propagate_theme_changed(Node *p_at, Control *p_owner, Window *p_owner_window, bool p_assign) { @@ -2374,7 +2374,7 @@ void Control::minimum_size_changed() { //invalidate cache upwards while (invalidate && invalidate->data.minimum_size_valid) { invalidate->data.minimum_size_valid = false; - if (invalidate->is_set_as_toplevel()) { + if (invalidate->is_set_as_top_level()) { break; // do not go further up } if (!invalidate->data.parent && get_parent()) { diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index 9077bfa4ba..430e98d50e 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -181,7 +181,7 @@ void AcceptDialog::_update_child_rects() { continue; } - if (c == hbc || c == label || c == bg || c->is_set_as_toplevel()) { + if (c == hbc || c == label || c == bg || c->is_set_as_top_level()) { continue; } @@ -209,7 +209,7 @@ Size2 AcceptDialog::_get_contents_minimum_size() const { continue; } - if (c == hbc || c == label || c->is_set_as_toplevel()) { + if (c == hbc || c == label || c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 467d252c81..a7c15e7027 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -547,7 +547,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { } bool GraphEdit::_check_clickable_control(Control *p_control, const Vector2 &pos) { - if (p_control->is_set_as_toplevel() || !p_control->is_visible()) { + if (p_control->is_set_as_top_level() || !p_control->is_visible()) { return false; } diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 01b54ddaa8..38bf31830f 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -102,7 +102,7 @@ void GraphNode::_get_property_list(List<PropertyInfo> *p_list) const { int idx = 0; for (int i = 0; i < get_child_count(); i++) { Control *c = Object::cast_to<Control>(get_child(i)); - if (!c || c->is_set_as_toplevel()) { + if (!c || c->is_set_as_top_level()) { continue; } @@ -131,7 +131,7 @@ void GraphNode::_resort() { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -156,7 +156,7 @@ void GraphNode::_resort() { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -388,7 +388,7 @@ Size2 GraphNode::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -477,7 +477,7 @@ void GraphNode::_connpos_update() { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/margin_container.cpp b/scene/gui/margin_container.cpp index 0299065f77..b674b492d8 100644 --- a/scene/gui/margin_container.cpp +++ b/scene/gui/margin_container.cpp @@ -43,7 +43,7 @@ Size2 MarginContainer::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (!c->is_visible()) { @@ -80,7 +80,7 @@ void MarginContainer::_notification(int p_what) { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/panel_container.cpp b/scene/gui/panel_container.cpp index 9abdfac009..051b4de825 100644 --- a/scene/gui/panel_container.cpp +++ b/scene/gui/panel_container.cpp @@ -45,7 +45,7 @@ Size2 PanelContainer::get_minimum_size() const { if (!c || !c->is_visible()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -95,7 +95,7 @@ void PanelContainer::_notification(int p_what) { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 8a65aa5032..de866fa956 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -191,7 +191,7 @@ Size2 PopupPanel::_get_contents_minimum_size() const { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -215,7 +215,7 @@ void PopupPanel::_update_child_rects() { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index b72b913af0..fcbf064dec 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -45,7 +45,7 @@ Size2 ScrollContainer::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (c == h_scroll || c == v_scroll) { @@ -285,7 +285,7 @@ void ScrollContainer::_notification(int p_what) { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (c == h_scroll || c == v_scroll) { @@ -527,7 +527,7 @@ String ScrollContainer::get_configuration_warning() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (c == h_scroll || c == v_scroll) { diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index 5c60153d91..6508be1e43 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -41,7 +41,7 @@ Control *SplitContainer::_getch(int p_idx) const { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 41b8fad49d..14a10ea627 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -478,7 +478,7 @@ void TabContainer::_on_mouse_exited() { int TabContainer::_get_tab_width(int p_index) const { ERR_FAIL_INDEX_V(p_index, get_tab_count(), 0); Control *control = Object::cast_to<Control>(_get_tabs()[p_index]); - if (!control || control->is_set_as_toplevel() || get_tab_hidden(p_index)) { + if (!control || control->is_set_as_top_level() || get_tab_hidden(p_index)) { return 0; } @@ -537,7 +537,7 @@ void TabContainer::add_child_notify(Node *p_child) { if (!c) { return; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { return; } |