Optimize the callback argument of popup_create_dialog()#106071
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Nov 14, 2025
Merged
Optimize the callback argument of popup_create_dialog()#106071Repiteo merged 1 commit intogodotengine:masterfrom
callback argument of popup_create_dialog()#106071Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
3b8abf6 to
ea4dd1b
Compare
ea4dd1b to
cdd6943
Compare
Contributor
Author
|
note that the method is marked as experimental, so even though it's breaking compatibility, I think it's still ok to do so |
Member
|
Wouldn't it be enough to return a String? Class name if it's native class and script path if it's custom type. You can get class name from a script path if someone needs it. |
Contributor
Author
Forgot to add the code you mentioned because I've already done it but idk why it didn't get uploaded... Edit: Resolved |
cdd6943 to
a5103ed
Compare
KoBeWi
reviewed
Jun 22, 2025
KoBeWi
reviewed
Jun 22, 2025
KoBeWi
approved these changes
Jun 22, 2025
a5103ed to
443b2ab
Compare
443b2ab to
251d037
Compare
Contributor
|
Thanks! |
callback argument of popup_create_dialog()callback argument of popup_create_dialog() (reverted)
callback argument of popup_create_dialog() (reverted)callback argument of popup_create_dialog()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improvement of #100135
I noticed that the callback (
callableargument in the method) only returns the name of the type. However, when it comes to scripts, you cannot have any idea to instantiate it from the name.Now the callback will return a string: If the type is script, it will return the path to the script file instead of its name. Native types keep still.
Chat log: https://chat.godotengine.org/channel/editor?msg=EiJdzCYoZaYihNRTR