-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Added more missing properties/methods to the Godot converter #70913
Added more missing properties/methods to the Godot converter #70913
Conversation
For the methods/properties, there's also a table for C# replacements which would be good to sync. |
51abd16
to
f499218
Compare
Done. :) |
Just had a look in the history. The |
f499218
to
21061b3
Compare
From what I understand of the code there is a problem where if one property spelling exists for multiple nodes they all will be renamed even if they are incompatible. Should it be better to do renaming node properties and functions done on a node to node basis rather than the current global perspective? |
@acedogblast It works as it does because we can't be sure with untyped GDScript what type does a property hold. And even for typed, I don't think we do any kind of static analysis. |
Then how about the vertical and horizontal alignment for labels. In Godot 3.5 they are referred to as "align" and "valign" in Godot 4.0 they have been renamed to "horizontal_alignment" and "vertical_alignment". In both versions they can only be assigned 4 same possible values. I was not sure if we can add that to the list as "align" may be used in other nodes with a different context. |
If the expected result is mostly positive, we can add it. If it has a big negative impact on an average codebase, then we shouldn't add it. It will never be completely safe as users may declare any sort of variable or method, and we can conflict with that. Which is why we have a disclaimer that this convertor operates as a best effort tool. |
Yeah, |
21061b3
to
9e20350
Compare
9e20350
to
c25b440
Compare
icon_align -> icon_alignment rect_min_size -> custom_minimum_size get_tree().set_input_as_handled() -> get_viewport().set_input_as_handled() _unhandled_key_input(event: InputEventKey) -> _unhandled_key_input(event: InputEvent) And C# equivalents
c25b440
to
e27695e
Compare
Thanks! |
While converting a bigger project I found some properties/methods which were not yet covered by the converter.
The following properties/methods are converted now:
icon_align
->icon_alignment
(get + set were already converted)rect_min_size
->custom_minimum_size
get_tree().set_input_as_handled()
->get_viewport().set_input_as_handled()
_unhandled_key_input(event: InputEventKey)
->_unhandled_key_input(event: InputEvent)
And C# equivalents