-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Setting colorRGBA does not set alpha #1363
Comments
I honestly don't really understand why color and colorRGBA are separated. Maybe for cascading purposes, I didn't look into that yet. Will see what we can do about it. |
I also don't understand why we still maintain types like |
The ccColor4F guff was due to die in 4.0 wasn't it?. Suspect it was considered too much of (another) major back compatibility break during the 2.x to 3.x process. Pain though isn't it? The whole cascade colour/opacity has some serious issues as well. Will try and dig them out and file issues/PRs now this is active again. |
CCColor was created to bridge all the different color types. Personally I voted that it should be a simple struct (and work more like CGPoint), and I have always hated that CCColor is immutable. color just sets the color, and not opacity. This is how cocos2d always worked. colorRGBA was added to be able to set a color including opacity. As mentioned, the cascade functionality has some issues, like the one I just reported. |
Making it a struct would be much better, but Obj-C doesn't have methods for structs as Swift has :( |
Setting colorRGBA on CCNodeColor does not set color correctly, unless cascade opacity is enabled.
The text was updated successfully, but these errors were encountered: