Hey All,
So im working on some different menus and one of my menus is just a floating menu that appears when you win or loose. It is all one image but it has three round buttons. my question is can i make a button without an image or text?
Thanks
-Lars
MenuItem Question
(5 posts) (2 voices)-
Posted 2 years ago #
-
Some possible ways around it:
- create a transparent png the size of the button and use that as a regular button
OR
- use the new touch dispatcher (0.8.x) to touch enable CocosNode's with their contentSize & position set to the same as the buttons
OR
- remove the buttons from the background image, and just load them separately on top as a normal menu
OR
- touch enable the layer & just check if the touch position is within certain areas to trigger a specific event.
OR
- I'm sure theres other ways to do it too......One thing to note, its nice to give the user some feedback/impression that their actually activating/triggering the button, so I'd be inclined to pull the images out of the background, and add them as separate regular menu items with a scale or colour change to indicate a touch/click.
Posted 2 years ago # -
Hey Phil,
Thanks for the reply. I do have one quick question. the menu item contains drop shadows and i noticed on the simulator they dont display right. is this because of the compression? I havent paid to use it on the device since im not a programmer and im just doing this as a hobby. So as of right now I have no way of testing this myself.
Thanks
-LarsPosted 2 years ago # -
No probs.
I'm not entirely sure about your image issue. There's quite a few posts on this forum about a few different things that can effect image output. Although the simulator seems to sometimes display differently to the device, so it can be hard to tell.
Might be worth looking through the FAQ (if you haven't already), specifically at the 'My PNG doesn't look like in Photoshop' section:
http://www.cocos2d-iphone.org/wiki/doku.php/faqPosted 2 years ago # -
Ok. So i split up my images and made two seperate layers. win and lose. i want them to display in an action that i have in my active layer. i changed the .visible property but that only says if its supposed to be seen but its still in the way.
This is what i have right now:
GameScene:
WinLayer *winLayer = [WinLayer node]; [self addChild:winLayer z:1]; winLayer.visible = NO; LoseLayer *loseLayer = [LoseLayer node]; [self addChild:loseLayer z:1]; loseLayer.visible = NO;ActiveLayer
LoseLayer *loseLayer = [LoseLayer node]; loseLayer.visible = YES;and same for win. how do i do this?
Thanks
-LarsPosted 2 years ago #
Reply
You must log in to post.