summaryrefslogtreecommitdiffstats
path: root/scene/main/canvas_item.cpp
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-02-02 17:20:31 +0100
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-02-02 17:37:41 +0100
commit3bc426c9d80db193792e8639b88935ff388ec6fb (patch)
treec8430016d722abf6bfc3cb20a3a1840a3c280688 /scene/main/canvas_item.cpp
parent315d3c4d21e4ee7df1e45593205e35d7a034aa6d (diff)
downloadredot-engine-3bc426c9d80db193792e8639b88935ff388ec6fb.tar.gz
Fix toplevel nomenclature
toplevel was 3.x top_level is 4.x
Diffstat (limited to 'scene/main/canvas_item.cpp')
-rw-r--r--scene/main/canvas_item.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index 541c7a0587..0ea8f6c5f1 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -185,7 +185,7 @@ void CanvasItem::_top_level_raise_self() {
}
void CanvasItem::_enter_canvas() {
- // Resolves to nullptr if the node is toplevel.
+ // Resolves to nullptr if the node is top_level.
CanvasItem *parent_item = get_parent_item();
if (parent_item) {
@@ -400,26 +400,26 @@ void CanvasItem::set_as_top_level(bool p_top_level) {
_exit_canvas();
top_level = p_top_level;
- _toplevel_changed();
+ _top_level_changed();
_enter_canvas();
_notify_transform();
}
-void CanvasItem::_toplevel_changed() {
- // Inform children that toplevel status has changed on a parent.
+void CanvasItem::_top_level_changed() {
+ // Inform children that top_level status has changed on a parent.
int children = get_child_count();
for (int i = 0; i < children; i++) {
CanvasItem *child = Object::cast_to<CanvasItem>(get_child(i));
if (child) {
- child->_toplevel_changed_on_parent();
+ child->_top_level_changed_on_parent();
}
}
}
-void CanvasItem::_toplevel_changed_on_parent() {
- // Inform children that toplevel status has changed on a parent.
- _toplevel_changed();
+void CanvasItem::_top_level_changed_on_parent() {
+ // Inform children that top_level status has changed on a parent.
+ _top_level_changed();
}
bool CanvasItem::is_set_as_top_level() const {