-
Notifications
You must be signed in to change notification settings - Fork 903
Sprites broken on retina displays #3442
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
Comments
I have the same problem and made some research. The method This is not a bug, but I absolutely don't understand why such behavior was introduced intentionally, maybe the commiter wanted to deprecate some old methods of retina support made exclusively for iOS. But we can't just fix the problem by setting cc.IS_RETINA_DISPLAY_SUPPORTED back to 1. In my situation such step breaks ccui.button. Currently the only reliable solution is to continue using v3.13. Waiting for the solution from the developers. |
What is broken exactly in ccui.Button? |
Nevermind, I just found out clicking them does not work. |
ccui.Button shows just the top left quarter of a whole sprite when cc.IS_RETINA_DISPLAY_SUPPORTED is set to 1. |
I think it can be closed by #3464 |
I'm using two set of sprites: hd for retina and common for non-retina displays.
But they are not scaled twice on retina display after this PR: #3412.
I'm calling
cc.director.setContentScaleFactor(2.0)
to scale sprites if display is retina. But after pr, this function doesn't affects anything.The text was updated successfully, but these errors were encountered: