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

Godot 3 to 4 Conversion: scene Label align and valign values get discarded #74493

Closed
Tracked by #73960
Reneator opened this issue Mar 6, 2023 · 6 comments · Fixed by #82894
Closed
Tracked by #73960

Godot 3 to 4 Conversion: scene Label align and valign values get discarded #74493

Reneator opened this issue Mar 6, 2023 · 6 comments · Fixed by #82894

Comments

@Reneator
Copy link

Reneator commented Mar 6, 2023

Godot version

v4.0.stable.official [92bee43]

System information

Windows 10

Issue description

Label align and valign just get discarded, having to replace them with the new values.
in the .tscn files it would be a conversion of:

valign = 1 = vertical_alignment = 1
align = 1 = horizontal_alignment = 1

~~
But to get it to actually work the Label inside the tscn would also need to get the layout_mode = 2 attribute to have set, else it will discard the replaced values~~
(After specific testing this doesnt seem to be the culprit, but the main issue above still stands)

(Tested by changes via external text-editor on the tscn file directly before opening it.)

Steps to reproduce

migration from 3.X to 4

Minimal reproduction project

Reproduction label center getting lost.zip

@YuriSizov
Copy link
Contributor

Layout mode has nothing to do with text alignment inside of the label. You do have a typo in your code sample though.

@Reneator
Copy link
Author

Reneator commented Mar 6, 2023

Fixed the typo, that happens if you do it free hand.

Its just a behaviour that i noticed, that if i just replace the align and valign with the new property names, those settings get discarded, unless i also add the layout_mode = 2 in the .tscn

@YuriSizov
Copy link
Contributor

That's not possible, something else must be happening at the same time. Please provide MRP that demonstrates the issue.

@Reneator
Copy link
Author

Reneator commented Mar 6, 2023

Added an MRP created in godot v3.5.1.stable.official [6fed1ff] with 3 .tscn files, 3 times just a label with centered text, the first one with no manual changes to the .tscn,
the second with the new names for the align and valign and the third with the layout_mode = 2 also added.

(The third one is not relevant for the core issue of this topic, but just wanted to leave it in for test-purposes)

The first scene will remove the alignment
the second scene will keep the alignment due to proper renaming, done manually.

@naturally-intelligent
Copy link

Also had this issue, had to reset all labels by hand

@Quimisagi
Copy link
Contributor

Quimisagi commented Oct 5, 2023

Tried this on my machine using the MRP and can confirm that the issue exists. Will try to fix it.

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

Successfully merging a pull request may close this issue.

6 participants