You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
Accessing the notification, when the size of the root window changes is very unintuitive.
This problem has been discussed in the bug report godotengine/godot#79336 which was solved by improving the documentation. However the unintuitive way could be improved.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The problem itself can be solved by making NOTIFICATION_WM_SIZE_CHANGED available to child nodes of the window. That allows users to easily access when the root window is changed.
Since this change could have a negative performance impact, the performance impact needs to be evaluated beforehand.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Implementation is likely straightforward.
Whenever a Window receives a NOTIFICATION_WM_SIZE_CHANGED, it automatically sends the notification recursively to child nodes with the exception of other Window-nodes and their children.
If this enhancement will not be used often, can it be worked around with a few lines of script?
In order to access the notifcation in the root window, one has to create a GDScript, that add a GDScript to the root node, that listens to notifications. A demo project of how to do that is available in godotengine/godot#79336 (comment).
Is there a reason why this should be core and not an add-on in the asset library?
This is a core behavior
The text was updated successfully, but these errors were encountered:
i think that emitting a signal would be more straightforward to implement and doesn't require handling the case of having another window as a child node
Sauermann
changed the title
Make `NOTIFICATION_WM_SIZE_CHANGED´ available to child nodes of the window
Notify users about window size changes
Jan 15, 2024
Describe the project you are working on
Godot
Describe the problem or limitation you are having in your project
Accessing the notification, when the size of the root window changes is very unintuitive.
This problem has been discussed in the bug report godotengine/godot#79336 which was solved by improving the documentation. However the unintuitive way could be improved.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The problem itself can be solved by making
NOTIFICATION_WM_SIZE_CHANGED
available to child nodes of the window. That allows users to easily access when the root window is changed.Since this change could have a negative performance impact, the performance impact needs to be evaluated beforehand.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Implementation is likely straightforward.
Whenever a
Window
receives aNOTIFICATION_WM_SIZE_CHANGED
, it automatically sends the notification recursively to child nodes with the exception of otherWindow
-nodes and their children.If this enhancement will not be used often, can it be worked around with a few lines of script?
In order to access the notifcation in the root window, one has to create a GDScript, that add a GDScript to the root node, that listens to notifications. A demo project of how to do that is available in godotengine/godot#79336 (comment).
Is there a reason why this should be core and not an add-on in the asset library?
This is a core behavior
The text was updated successfully, but these errors were encountered: