-
Notifications
You must be signed in to change notification settings - Fork 298
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
MacOS with Retina: UI clickable area is calculated incorrectly #281
Comments
Hi and thanks for the video! Unfortunately I don't have a MacOS device and can't reproduce/debug/fix. The relevant code is probably in |
I am able to reproduce this issue on a MacBook Pro M1. |
How to put this in html? |
@TheRealDigitalMaster please see #282 (comment). |
Hi, I come late to the party and took a moment to apply #161 tu current master, and it brings some improvement: the button is now clickable, but apparently incorrectly scaled (2x) with regards to size and position I guess. I also am experiencing a strange glitch where initially the 3D scene takes only lower left quadrant of the window. It gets right after simply moving a window (!). And after moving a window button is clickable: EDIT Glitch resolved by fixing
Now the UI is rendered properly, but mouse coordinates read improperly (need to move to coordinates 2x position of the button to click). Probably resolved by simple fix of the mouse coordinate reading? |
Hi @tomekc , your solution works for me. The cursor position does not have the 2x error but have 2 pixels offset on my computer. r.Gls().Viewport(0, 0, (int32)((float64)(w)*scaleX), (int32)((float64)(h)*scaleY)) which scaleX/Y is float64 |
Most likely bug is caused by incorrect calculation of UI element position due to Retina. See video for a reproduction. I used an example code from the readme.md
Screen.Recording.2022-08-09.at.19.41.23.mov
The text was updated successfully, but these errors were encountered: