Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename raise() to move_to_front() #60108

Merged
merged 1 commit into from
Sep 8, 2022
Merged

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Apr 10, 2022

Closes #28948

@KoBeWi KoBeWi added this to the 4.0 milestone Apr 10, 2022
@KoBeWi KoBeWi requested review from a team as code owners April 10, 2022 18:53
scene/gui/graph_edit.cpp Outdated Show resolved Hide resolved
doc/classes/Node.xml Outdated Show resolved Hide resolved
@akien-mga
Copy link
Member

We discussed this in a PR review meeting. Since this is only used for 2D (only on Control nodes AFAICT), this could be moved to CanvasItem, and that solves the disconnect between describing a sibling relationship and graphics. So then it can be move_to_top or move_to_front and refer explicitly to the 2D rendering effect.

For plain Nodes, there is still move_child.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to keep track of it but needs some changes.

@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 6, 2022

Updated. I used a little trick, because the method needs access to Node's internals and I didn't want to modify them too much.

EDIT:
Ok there was actually a simpler way to do this.

@KoBeWi KoBeWi force-pushed the arise_to_top branch 2 times, most recently from c29ba1a to b5fd3da Compare September 6, 2022 14:49
@aaronfranke aaronfranke changed the title Rename raise() to move_to_top() Rename raise() to move_to_front() Sep 6, 2022
scene/main/node.h Outdated Show resolved Hide resolved
@akien-mga akien-mga merged commit 7936b3c into godotengine:master Sep 8, 2022
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

Node.raise() is misleading
9 participants