Closed fariazz closed 10 years ago
Confirmed and reported here also: https://github.com/cykod/Quintus/pull/78#issuecomment-35431924
That is my fault. I needed to extend UI.Button, like here https://github.com/krzysu/game-off-2013/blob/master/app/scripts/game/sprites/ui/level_button.coffee. Quintus wasn't supporting that. So I added defaultProps
to library source. But that introduced the problem you are describing. I found this workaround and used it in my game. Just add type to properties of your UI.Button sprite type: Q.SPRITE_UI | Q.SPRITE_DEFAULT
. I will fix that and send pull request as soon as possible.
One more example here: https://github.com/krzysu/game-off-2013/blob/master/app/scripts/game/scenes/level_summary.coffee#L76-L86
Changed Q.UI.Button parameter order back to callback
In this commit: https://github.com/cykod/Quintus/commit/68da27b7e7ea8b43b951f5f813d7673e7c6935c1
The button parameters were changed from:
to:
After which all Button usage prior to that date is now broken, including the UI and the audio examples that come with quintus.
I think the defaultProps parameter should be moved to the end like this so this doesn't alter the existing API:
If it won't be changed maybe it would be good to add a note on the new version that warns developers to update their previous code..