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

gui.get_screen_position does not return values scaled (DEF-2961) #3188

Closed
britzl opened this issue May 23, 2019 · 2 comments
Closed

gui.get_screen_position does not return values scaled (DEF-2961) #3188

britzl opened this issue May 23, 2019 · 2 comments
Labels
bug Something is not working as expected engine Issues related to the Defold engine gui Issues related to gui components

Comments

@britzl
Copy link
Contributor

britzl commented May 23, 2019

Reported by Presto

Getting a node position with gui.get_screen_position, and then placing another node at the returned position fails if the target device resolution is not 1:1 to game.project setting.

If your game is set to 720x1280 and your device is 720x1280 correct position is returned.
If your game is set to 720x1280 and your device is 360x640 returned position is scaled by 0.5.
If your game is set to 720x1280 and your device is 1440x2560 returned position is scaled by 2.0.

Investigate this, also mind backward compatibility if this is considered a bug fix.
2017-11-14 11:23:13 (Mattias.Hedberg)
(LINK REMOVED)

@britzl britzl added bug Something is not working as expected engine Issues related to the Defold engine and removed bug Something is not working as expected labels May 23, 2019
@britzl britzl added the gui Issues related to gui components label Oct 29, 2019
@AGulev
Copy link
Contributor

AGulev commented Jul 27, 2022

I think it's not an issue anymore when we have #5886
isn't it?

@britzl
Copy link
Contributor Author

britzl commented Jul 27, 2022

I think you are correct! Closing.

@britzl britzl closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as expected engine Issues related to the Defold engine gui Issues related to gui components
Projects
None yet
Development

No branches or pull requests

2 participants