I'm trying to use a MenuItemToggle with two MenuItemAtlasSprites and it's not working properly: both images appear at the same time and in the wrong position. Using labels works fine. Any tips for this? There are no examples of this in the Cocos2D demos...
Do toggle menu items work with images?
(4 posts) (3 voices)-
Posted 2 years ago #
-
I haven't tried using AtlasSprites with MenuItemToggle, but I'd be interested in hearing about your progress.
My positioning problem using MenuItemAtlasSprites in 0.7.3 was that the sprites were significantly offset from the touch rect (for selection):
http://img.skitch.com/20090623-qchb5kujuen7er36fd6mhdhi33.png</img>
My fix was calling setPosition to move AtlasSpriteManager to the center of the screen (160, 240), but I'm unsure if I'm just hacking around a bug.
How are your images appearing incorrectly?
Posted 2 years ago # -
I haven't had any luck trying to figure this out. Any suggestions?
Posted 2 years ago # -
Yeah.. just use a regular button and change the image everytime it's clicked.
Posted 2 years ago #
Reply
You must log in to post.