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

Add release_children_focus to Control #11721

Open
InkONat opened this issue Feb 7, 2025 · 2 comments
Open

Add release_children_focus to Control #11721

InkONat opened this issue Feb 7, 2025 · 2 comments

Comments

@InkONat
Copy link

InkONat commented Feb 7, 2025

Describe the project you are working on

Level editor, uses a lot of Control nodes

Describe the problem or limitation you are having in your project

No single method to release the focus of all children and subchildren of a Control node

Describe the feature / enhancement and how it helps to overcome the problem or limitation

A simple method that goes through the children of the Control node and releases their focus. Could be called release_children_focus, unfocus_all_children, etc. I don't think it should unfocus itself as well, but that could be a parameter for the method (something like release_children_focus ( release_self : bool )

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

The method could call release_focus on all of the children nodes of the Control node that called the method

If this enhancement will not be used often, can it be worked around with a few lines of script?

propagante_call("release_focus") works, but for beginners it would be more intuitive to have a function for it

Is there a reason why this should be core and not an add-on in the asset library?

Control node is core

@InkONat InkONat changed the title Add unfocus_all_children to Control Add release_children_focus to Control Feb 7, 2025
@sockeye-d
Copy link

I think you could do

propagate_call("release_focus")

@InkONat
Copy link
Author

InkONat commented Feb 8, 2025

I think that can work, but a method for it is more intuitive and easier to use, I will update the issue to include that though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants