Skip to content

ccMenuItem.js, ccMenuItemToggle Example Has Bad Code #990

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

Closed
mcscooter opened this issue Jun 25, 2013 · 2 comments
Closed

ccMenuItem.js, ccMenuItemToggle Example Has Bad Code #990

mcscooter opened this issue Jun 25, 2013 · 2 comments

Comments

@mcscooter
Copy link
Contributor

Line 1147: * var toggler = cc.MenuItemToggle.create(this, this.callback, cc.MenuItemFont.create("On"), cc.MenuItemFont.create("Off"))

arguments are in the wrong order, should have the menuItemFont objects first:

  • var toggler = cc.MenuItemToggle.create( cc.MenuItemFont.create("On"), cc.MenuItemFont.create("Off"), this.callback, this)

Sorry, I didn't have time to submit a fix for this right now, maybe someone else can roll this into another change since it's just the example

@mcscooter
Copy link
Contributor Author

Found time to issue an update for this #991

@dingpinglv
Copy link
Contributor

Thank you, Scott Cummings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants