CCMenuItemToggle set selected item

Forums Programming cocos2d support (graphics engine) CCMenuItemToggle set selected item

This topic contains 2 replies, has 3 voices, and was last updated by  komal 3 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
Author Posts
Author Posts
October 22, 2010 at 9:29 pm #225651


I have a pause button in my game which uses a CCMenuItemToggle. But once pause there is a second button to resume the game, if I resume the game through the second button instead of the first after it has resumed the Toggle item shows the wrong item. Is there a way to set the selected item through code instead of clicking?

I was thinking about:

[ToggleItem setSelectedItem: MenuItem];

Thank you


October 22, 2010 at 10:22 pm #302189


[ToggleItem setSelectedIndex: <number>];

October 23, 2010 at 7:32 am #302190


Follow this link. I think it will help you if you need more guidance.

Good Luck

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.