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

Popup window aspect artifacts #19

Closed
acgc99 opened this issue Nov 9, 2023 · 2 comments
Closed

Popup window aspect artifacts #19

acgc99 opened this issue Nov 9, 2023 · 2 comments
Assignees
Labels
bug Something isn't working showcase Issues related to the showcase project
Milestone

Comments

@acgc99
Copy link
Owner

acgc99 commented Nov 9, 2023

This is an scaling artifact caused by display/window/stretch/aspect = expand, with ignore/keep there is no problem. Related to #18. This can be solved with anchors.

image

image

@acgc99 acgc99 added bug Something isn't working showcase Issues related to the showcase project labels Nov 9, 2023
@acgc99 acgc99 added this to the 1.0.0 milestone Nov 9, 2023
@acgc99 acgc99 changed the title Popup bad positioned but correct one is wrong Popup window aspect artifacts Nov 9, 2023
@acgc99
Copy link
Owner Author

acgc99 commented Nov 10, 2023

This can be solved with anchors I hope, like #18. I decided to use appearing/disappearing animations to bypass the problem, I am not very fluent with anchors and I could not be able to get a full solution.

@acgc99 acgc99 closed this as completed in 89d7866 Nov 10, 2023
@acgc99
Copy link
Owner Author

acgc99 commented Nov 12, 2023

I recovered shrink/expand behavior at 20eab48. You have to anchors preset to full rect and prepare position and scale manually at the scene where the popup is placed:

func _ready() -> void:
	popup.position = size/2.0
	popup.scale = Vector2.ZERO

Here size corresponds to the viewport size (because parent node has an anchors preset of full rect), that size might be different from the one specified on the project settings depending on Project Settings > Display > Windows > Stretch options.

@acgc99 acgc99 self-assigned this Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working showcase Issues related to the showcase project
Projects
None yet
Development

No branches or pull requests

1 participant