<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>cocos2d for iPhone &#187; Tag: MenuItem - Recent Posts</title>
		<link>http://www.cocos2d-iphone.org/forum/tags/menuitem</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 03:15:50 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cocos2d-iphone.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.cocos2d-iphone.org/forum/rss/tags/menuitem" rel="self" type="application/rss+xml" />

		<item>
			<title>ShaneT on "MenuItem FadeIn glitch?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3413#post-125358</link>
			<pubDate>Thu, 10 Nov 2011 12:04:01 +0000</pubDate>
			<dc:creator>ShaneT</dc:creator>
			<guid isPermaLink="false">125358@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi,</p>
<p>I am trying to make a menu see through.</p>
<p>radioMenu.opacity = 0;</p>
<p>When I try this I get told opacity is a readonly fielld and cannot be set.</p>
<p>Same goes for </p>
<p>((CCMenuItem*) settings).opacity = 0;<br />
or<br />
[(CCMenuItem*)settings setOpacity: 0];</p>
<p>How do I make a menu item images opacity 50?</p>
<p>I am trying to implement a pause button on the screen to pause and resume.</p>
<p>The pause button is on the Hud Layer.</p>
<p>Thanks</p>
<p>Shane
</p></description>
		</item>
		<item>
			<title>msultakov on "MenuItem with dynamic text and image"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22082#post-124588</link>
			<pubDate>Sat, 05 Nov 2011 08:59:40 +0000</pubDate>
			<dc:creator>msultakov</dc:creator>
			<guid isPermaLink="false">124588@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thank you all very much!<br />
Both solutions proposed are useful for me: I've already applied the easier one (with x-scaling) on the prototyping stage and will definitely use the more nice-looking but more difficult to implement (with 3 or 9 boxes) in the final version.
</p></description>
		</item>
		<item>
			<title>varedis on "MenuItem with dynamic text and image"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22082#post-123980</link>
			<pubDate>Tue, 01 Nov 2011 12:24:31 +0000</pubDate>
			<dc:creator>varedis</dc:creator>
			<guid isPermaLink="false">123980@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/26926'>geoegroeg</a></p>
<p>You must admit though it does look ugly: (same button with different widths)<br />
<img src="http://dl.dropbox.com/u/18871634/buttons.png" alt="" /></p>
<p>And that last method you mentioned is basically a 3 slice scaling box like I mentioned where you can only adjust the width or height but not both.</p>
<p>The reason I didn't link to any of those as there are no pre made cocos2d versions that I could find.
</p></description>
		</item>
		<item>
			<title>geoegroeg on "MenuItem with dynamic text and image"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22082#post-123978</link>
			<pubDate>Tue, 01 Nov 2011 12:14:34 +0000</pubDate>
			<dc:creator>geoegroeg</dc:creator>
			<guid isPermaLink="false">123978@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/29'>Stephen</a> Morris</p>
<p>That's why I told him to try it. He might be pleased with the results. And since it takes like 1 minute to do it , I think it's worth it.<br />
The idea is to look well. I don't really think he cares about the corner radius. Yes , it will get changed a bit , but it will remain curved.</p>
<p>And if that is not working , then he can have the middle part scaled on the X and attach the 2 corners.That will surely be looking fine.
</p></description>
		</item>
		<item>
			<title>Stephen Morris on "MenuItem with dynamic text and image"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22082#post-123976</link>
			<pubDate>Tue, 01 Nov 2011 11:57:51 +0000</pubDate>
			<dc:creator>Stephen Morris</dc:creator>
			<guid isPermaLink="false">123976@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/26926'>geoegroeg</a></p>
<p>Although it is far easier, it doesn't take into account the distortion that will happen to the curved corners.
</p></description>
		</item>
		<item>
			<title>geoegroeg on "MenuItem with dynamic text and image"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22082#post-123975</link>
			<pubDate>Tue, 01 Nov 2011 11:51:38 +0000</pubDate>
			<dc:creator>geoegroeg</dc:creator>
			<guid isPermaLink="false">123975@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi,</p>
<p>Cocos2D can scale on X, Y or both of them.<br />
So , if the background image of your items is the black one above, you could also try simply scaling it on X.I mean something like this:</p>
<p>Sprite *mySprite = [CCSprite spriteWithFile:@"myBlacksprite.png"];<br />
mySprite.scaleX = mySprite.contentSize.width/desiredWidth;</p>
<p>The idea is for you to have the maximum size of the image in your resources and make it smaller. Never try to make it bigger (well, there are times when you can do that , but it's not relevant here). I think you should give this a try and see if it looks ok. It is far easier that 9 patch button technique.</p>
<p>Hope this helps,<br />
Regards ,<br />
George
</p></description>
		</item>
		<item>
			<title>varedis on "MenuItem with dynamic text and image"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22082#post-123544</link>
			<pubDate>Sat, 29 Oct 2011 08:16:41 +0000</pubDate>
			<dc:creator>varedis</dc:creator>
			<guid isPermaLink="false">123544@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>You need to look into scale 9 boxes for the button resizing:</p>
<p><a href="http://jpsarda.tumblr.com/post/9162433577/scale9grid-for-cocos2d" rel="nofollow">http://jpsarda.tumblr.com/post/9162433577/scale9grid-for-cocos2d</a><br />
<a href="http://www.crocodella.com.br/2011/07/resizable-decorated-box-using-cocos2d/" rel="nofollow">http://www.crocodella.com.br/2011/07/resizable-decorated-box-using-cocos2d/</a></p>
<p>You could possibly also get away with a scale 3 box for just resizing the width, but I don't know of any Cocos2d ones of the top of my head</p>
<p>The button would simply be your black background, you would then add the text and image through code something like this: (pseudo code)</p>
<pre><code>CCSpriteScale9 *buttonBg=[CCSpriteScale9 spriteWithFile:@&#34;backpanel.png&#34; andLeftCapWidth:32 andTopCapHeight:32];
[buttonBg adaptiveScale9:CGSizeMake(500,200)];

CCMenuItem *menuButton = [CCMenuItemSprite itemWithSprite:buttonBg selected:nil target:self selector:@selector(doSomething:)];

CCLabelBMFont *writing = [CCLabelBMFont labelWithString:@&#34;Rules&#34; fntFile:@&#34;myFont.fnt&#34;];
writing.position = ccp(menuButton.contentSize.width/2, menuButton.contentSize.height/2);
[menuButton addChild:writing];

// If you don&#039;t want to have to define the size of the Scale Box first you could probably change it down here based on the contentSize of the writing.

// Do same with the image as a CCSprite

// Add the menu button to a CCMenu</code></pre>
<p>That should be enough for you to go on
</p></description>
		</item>
		<item>
			<title>msultakov on "MenuItem with dynamic text and image"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22082#post-123532</link>
			<pubDate>Sat, 29 Oct 2011 06:20:07 +0000</pubDate>
			<dc:creator>msultakov</dc:creator>
			<guid isPermaLink="false">123532@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Up (sorry, but I do need to know the answer)
</p></description>
		</item>
		<item>
			<title>msultakov on "MenuItem with dynamic text and image"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22082#post-122724</link>
			<pubDate>Mon, 24 Oct 2011 06:53:25 +0000</pubDate>
			<dc:creator>msultakov</dc:creator>
			<guid isPermaLink="false">122724@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hello to everyone!<br />
I'm quite new to Cocos2d, so, please, don't be too strict :)</p>
<p>I need to display a menuitem which has a background, an icon and a text. Both icon and text are defined dynamically, so I cannot prepare an image that contains all the things I need.<br />
To be more concrete, here are two samples of what I would like to get as a result<br />
<img src="http://dl.dropbox.com/u/46656926/add_words.png" alt="http://dl.dropbox.com/u/46656926/add_words.png" /><br />
<img src="http://dl.dropbox.com/u/46656926/rules.png" alt="http://dl.dropbox.com/u/46656926/rules.png" /><br />
Tricky thing here for me is how to resize the background image, so that it looks nice with both short and long text.</p>
<p>Could you tell me, please, how can I get what want?</p>
<p>Thank you in advance!
</p></description>
		</item>
		<item>
			<title>Jamorn on "Sortable and Droppable Menu &amp; Menu Items"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3009#post-115679</link>
			<pubDate>Tue, 13 Sep 2011 10:13:14 +0000</pubDate>
			<dc:creator>Jamorn</dc:creator>
			<guid isPermaLink="false">115679@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Wow... lol this has been a long time since I posted this. Sorry guys, maybe you've all forgot about this functionality now but I've finally got the time to make it more general for you guys to use. I've posted the source code here:<br />
<a href="http://jamornh.com/creating-cocos2d-dock-implementation-ccmenudo" rel="nofollow">http://jamornh.com/creating-cocos2d-dock-implementation-ccmenudo</a></p>
<p>Enjoy and let me know if you've had any issues using it and what awesome games you're going to be using it for! :D
</p></description>
		</item>
		<item>
			<title>Jamorn on "MenuItem with image and text"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/2784#post-115178</link>
			<pubDate>Sat, 10 Sep 2011 03:36:56 +0000</pubDate>
			<dc:creator>Jamorn</dc:creator>
			<guid isPermaLink="false">115178@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I've also created a cocos2d class to do this called CCMenuItemLabelAndImage. The usage is exactly as you'd expect other cocos2d classes to. You can see the entire code for the class here: <a href="http://jamornh.com/creating-cocos2d-ccmenuitem-with-a-background" rel="nofollow">http://jamornh.com/creating-cocos2d-ccmenuitem-with-a-background</a></p>
<p>I hope this helps anybody that needs to create buttons with image and text so you don't have to create a hundred images for a hundred buttons with just different text.</p>
<p>The label os designed to move down 1 pixel when pressed to simulate the button press but that can also be customized in the "selected:" method.
</p></description>
		</item>
		<item>
			<title>cocos2Developer on "Menu events"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/1170#post-108329</link>
			<pubDate>Mon, 01 Aug 2011 22:01:15 +0000</pubDate>
			<dc:creator>cocos2Developer</dc:creator>
			<guid isPermaLink="false">108329@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>simple you can remove (removefromparentandcleanup:) the unsused invisible and disabled ccmenu :D
</p></description>
		</item>
		<item>
			<title>wedgekasegames on "Menu events"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/1170#post-108327</link>
			<pubDate>Mon, 01 Aug 2011 21:43:19 +0000</pubDate>
			<dc:creator>wedgekasegames</dc:creator>
			<guid isPermaLink="false">108327@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Not sure if anyone needs this anymore but I found a pretty nice solution for the menu problem.</p>
<p>1. Take a subclass/helper file for CCSprite and add a method that adds it as a delegate of the touch dispatcher with a lower priority than CCMenu (something like -1000) and set it to swallow touches.<br />
2. Use an instance of that class as the background to your popup menu to absorb all touches in background menus.<br />
3. For your popup, subclass CCMenu and override registerWithTouchDispatcher and set the priority lower than your background (-1001, for example).</p>
<p>Hope that helps someone!
</p></description>
		</item>
		<item>
			<title>Yoon Lee on "CCMenuItemSprite with animated sprites"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/5813#post-99447</link>
			<pubDate>Thu, 16 Jun 2011 21:33:12 +0000</pubDate>
			<dc:creator>Yoon Lee</dc:creator>
			<guid isPermaLink="false">99447@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi, I think overwriting will be much easier.<br />
1&#62; Create sub class</p>
<p>@interface AnimatedCCMenuItemSprite : CCMenuItemSprite<br />
{<br />
	CCFiniteTimeAction *selectedAction;<br />
}</p>
<p>@property(nonatomic, readwrite, retain) CCFiniteTimeAction *selectedAction;</p>
<p>2&#62; Over Write needed part </p>
<p>@implementation AnimatedCCMenuItemSprite<br />
@synthesize selectedAction;</p>
<p>-(void) selected<br />
{<br />
	[super selected];</p>
<p>	if( selectedImage_ )<br />
	{<br />
		[normalImage_ setVisible:NO];<br />
		[selectedImage_ setVisible:YES];<br />
		[disabledImage_ setVisible:NO];</p>
<p>	}<br />
	else<br />
	{<br />
		[normalImage_ setVisible:YES];<br />
		[selectedImage_ setVisible:NO];<br />
		[disabledImage_ setVisible:NO];<br />
	}<br />
}</p>
<p>-(void) unselected<br />
{<br />
	[super unselected];<br />
	[normalImage_ setVisible:YES];<br />
	[selectedImage_ setVisible:NO];<br />
	[disabledImage_ setVisible:NO];<br />
}</p>
<p>@end</p>
<p>3&#62;<br />
(Source code above has exactly same as exiting Original CCMenuItemSprite Source with that *You need to ADD Animation there)
</p></description>
		</item>
		<item>
			<title>mikemellor11 on "How to repeat action while MenuItem button held down?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/66#post-96669</link>
			<pubDate>Wed, 01 Jun 2011 11:36:59 +0000</pubDate>
			<dc:creator>mikemellor11</dc:creator>
			<guid isPermaLink="false">96669@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>You could declare your Gamelayer as a global variable, you could then access it from any class that includes it. Its difficult to say the best way of doing it for you as we don't know how your classes and such are connected.
</p></description>
		</item>
		<item>
			<title>Shogan on "How to repeat action while MenuItem button held down?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/66#post-96249</link>
			<pubDate>Sun, 29 May 2011 18:22:39 +0000</pubDate>
			<dc:creator>Shogan</dc:creator>
			<guid isPermaLink="false">96249@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Huge thread revival,</p>
<p>but I am using the above subclassed CCMenuItemImage and am able to successfully log output to the console when </p>
<pre><code>(void) selected;</code></pre>
<p>is called.</p>
<p>However, my problem is now that I need to run a function in my main game layer or in another class when the above method is called. How would I achieve this?</p>
<p>I only know how to do this:</p>
<pre><code>GameLayer * myLevelObject = [[GameLayer alloc] init];
	[myLevelObject testing];</code></pre>
<p>Which is totally ridiculous, as it is allocating and initializing my entire game scene each time the selected method is called!</p>
<p>What I ideally want to do is to call a method that counts up an integer while the button is held down, but this method is in the other class.</p>
<p>What is the best way of doing this?
</p></description>
		</item>
		<item>
			<title>IronMike on "Menu question"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/496#post-69204</link>
			<pubDate>Sun, 02 Jan 2011 03:45:02 +0000</pubDate>
			<dc:creator>IronMike</dc:creator>
			<guid isPermaLink="false">69204@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I take it back. I don't need to increment the variable. It works fine as it is coded.</p>
<p>THanks again for your help. My hair can stay in my head now.
</p></description>
		</item>
		<item>
			<title>IronMike on "MenuItem @Selector Help?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/5573#post-69197</link>
			<pubDate>Sun, 02 Jan 2011 02:42:58 +0000</pubDate>
			<dc:creator>IronMike</dc:creator>
			<guid isPermaLink="false">69197@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I was tagging the wrong part. I was tagging the menu and not the button in the menu. All is good now.
</p></description>
		</item>
		<item>
			<title>IronMike on "Menu question"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/496#post-69195</link>
			<pubDate>Sun, 02 Jan 2011 02:28:02 +0000</pubDate>
			<dc:creator>IronMike</dc:creator>
			<guid isPermaLink="false">69195@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Joker,</p>
<p>That worked! Thanks so much for the reply.</p>
<p>However, I now have a new problem. I am creating the buttons in a for loop like this</p>
<pre><code>int pbX = 30;
int pbY = 379;
int z=1001;

for(int y=0;y&#60;8;y++){

    for(int x=0;x&#60;6;x++){
            Button2 = [CCMenuItemImage
				  itemFromNormalImage:@&#34;but_patterns_selection.png&#34;
				  selectedImage: @&#34;but_patterns_selection_sel.png&#34;
				  target:self selector:@selector(displayPattern:)];
            PatternButton = [CCMenu menuWithItems: Button2, nil];
            PatternButton.position = ccp(pbX, pbY);
            Button2.tag = z;
	[self addChild:PatternButton z:2];

        pbX = pbX+52;
        z++;
    }

 pbY = pbY-49;
 pbX = 30;

}</code></pre>
<p>This creates a grid of buttons in rows and columns. As long as I can set a tag for each button it would work fine to name them all Button2. But now that I am tagging button 2 I need to increment it to: Button2, Button3, Button4....</p>
<p>How do i append my variable z to my variable?</p>
<p>CCMenuItem *[NSString stringWithFormat:@"Button%i",z] = ....................
</p></description>
		</item>
		<item>
			<title>joker on "Menu question"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/496#post-69182</link>
			<pubDate>Sat, 01 Jan 2011 21:12:03 +0000</pubDate>
			<dc:creator>joker</dc:creator>
			<guid isPermaLink="false">69182@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I'm guessing the problem is because you are assigning the tag to the menu as a whole and not to the individual button?</p>
<p>The button is Button2, PatternButton gets a tag of 1001 but is the menu that Button2 belongs to.</p>
<p>Can you try:<br />
<pre><code>Button2.tag = 1001;</code></pre></description>
		</item>
		<item>
			<title>IronMike on "MenuItem @Selector Help?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/5573#post-69176</link>
			<pubDate>Sat, 01 Jan 2011 19:21:51 +0000</pubDate>
			<dc:creator>IronMike</dc:creator>
			<guid isPermaLink="false">69176@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I'm able to access the MenuItem by</p>
<p>[self getChildByID:1001]</p>
<p>So the tag must be set properly, for instance if I change the visibility, the button disappears as expected.</p>
<p>[[self getChildByID:1001] setVisible:NO];
</p></description>
		</item>
		<item>
			<title>IronMike on "Menu question"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/496#post-69175</link>
			<pubDate>Sat, 01 Jan 2011 19:11:12 +0000</pubDate>
			<dc:creator>IronMike</dc:creator>
			<guid isPermaLink="false">69175@http://www.cocos2d-iphone.org/forum/</guid>
			<description><pre><code>-(id) init {
	if( (self=[super init] )) {

Button2 = [CCMenuItemImage
			   itemFromNormalImage:@&#34;but_patterns_selection.png&#34;
			   selectedImage: @&#34;but_patterns_selection_sel.png&#34;
			   target:self selector:@selector(displayPattern:)];
		PatternButton = [CCMenu menuWithItems: Button2, nil];
		PatternButton.position = ccp(pbX, pbY);
		[self addChild:PatternButton z:2 tag:1001];

	}
	return self;
}

-(void) displayPattern:(int)sender {
NSLog(@&#34;tag = %i&#34;,[sender tag]);
      if([sender tag] == 1001){
		NSLog(@&#34;button 1 pressed&#34;);
	}
}</code></pre></description>
		</item>
		<item>
			<title>joker on "Menu question"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/496#post-69132</link>
			<pubDate>Sat, 01 Jan 2011 11:25:36 +0000</pubDate>
			<dc:creator>joker</dc:creator>
			<guid isPermaLink="false">69132@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Perhaps you could post the code you're using, that doesn't work?
</p></description>
		</item>
		<item>
			<title>Benihana on "MenuItem @Selector Help?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/5573#post-69121</link>
			<pubDate>Sat, 01 Jan 2011 09:46:12 +0000</pubDate>
			<dc:creator>Benihana</dc:creator>
			<guid isPermaLink="false">69121@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Are you certain your tags are set? Place a breakpoint in the target selector to verify. </p>
<p>You can also use the userData to store a pointer directly to whatever you're testing the tags for:</p>
<p><code>STParty *tempParty = ((CCMenuItemSprite *)sender).userData;</code></p>
<p>but note that you won't be getting around whatever issue is causing tag to be -1.
</p></description>
		</item>
		<item>
			<title>IronMike on "Menu question"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/496#post-69119</link>
			<pubDate>Sat, 01 Jan 2011 09:20:09 +0000</pubDate>
			<dc:creator>IronMike</dc:creator>
			<guid isPermaLink="false">69119@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/135'>ob1</a> - can you tell me why [sender tag] is always -1 for me? I set the tag properly and can even manipulate the button using getChildByTag. But I can't determine which button is pressed because they all send -1 as the tag.
</p></description>
		</item>
		<item>
			<title>IronMike on "MenuItem @Selector Help?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/5573#post-69117</link>
			<pubDate>Sat, 01 Jan 2011 09:12:10 +0000</pubDate>
			<dc:creator>IronMike</dc:creator>
			<guid isPermaLink="false">69117@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>This doesn't work for me. [sender tag] is always -1. No matter what button is pressed! It's always -1.</p>
<p>I can get the button by using getChildByTag but I can't go the other way.... If [sender tag] actually worked my life would be so much easier. If I can't get it to work I am going to need to create  a function for each button that does nearly the same thing. When you have nearly 50 buttons, this is a pain in the a$$!!!!!
</p></description>
		</item>
		<item>
			<title>cocos2dbeginner on "Sortable and Droppable Menu &amp; Menu Items"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3009#post-68466</link>
			<pubDate>Mon, 27 Dec 2010 16:09:30 +0000</pubDate>
			<dc:creator>cocos2dbeginner</dc:creator>
			<guid isPermaLink="false">68466@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@Jamorn Did you clean up the code so can you share it with us ;) ?
</p></description>
		</item>
		<item>
			<title>riq on "Suggestion:  Modification to CCMenuItem to allow class method callbacks."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/11447#post-64791</link>
			<pubDate>Sat, 27 Nov 2010 19:15:08 +0000</pubDate>
			<dc:creator>riq</dc:creator>
			<guid isPermaLink="false">64791@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>sure. fixed:<br />
<a href="https://github.com/cocos2d/cocos2d-iphone/commit/3649c3daac0bf739a8d39d749d29b99a18082d4d" rel="nofollow">https://github.com/cocos2d/cocos2d-iphone/commit/3649c3daac0bf739a8d39d749d29b99a18082d4d</a>
</p></description>
		</item>
		<item>
			<title>rickms on "Suggestion:  Modification to CCMenuItem to allow class method callbacks."</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/11447#post-64780</link>
			<pubDate>Sat, 27 Nov 2010 16:48:16 +0000</pubDate>
			<dc:creator>rickms</dc:creator>
			<guid isPermaLink="false">64780@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi All,</p>
<p>The question came up in #<a href='http://www.cocos2d-iphone.org/forum/tags/cocos2d-iphone'>cocos2d-iphone</a> about the ability to use a class method as a call back to a  CCMenuItem.  After some investigation is seems that this is not possible with the current CCMenuItem code, as CCMenuItem's initWithTargetSelector does:</p>
<pre><code>sig = [[rec class] instanceMethodSignatureForSelector:cb];</code></pre>
<p>After some simple testing it seems like modifying it to :</p>
<pre><code>sig = [rec methodSignatureForSelector:cb];</code></pre>
<p>Would allow for both class and instance methods to be used.</p>
<p>Thoughts?</p>
<p>Rick
</p></description>
		</item>
		<item>
			<title>gangcil on "MenuItem FadeIn glitch?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3413#post-60867</link>
			<pubDate>Wed, 27 Oct 2010 10:33:54 +0000</pubDate>
			<dc:creator>gangcil</dc:creator>
			<guid isPermaLink="false">60867@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/30412'>tim</a>:<br />
thanks for the post...well it works well and the object fade in correctly......but what if i want to fade out it again??? here is what i did..</p>
<p> first add a sprite to scene<br />
<pre><code>resumeS = [CCSprite spriteWithFile:@&#34;Background_Pause_pad.png&#34;];
		[resumeS setPosition:ccp(384,470)];

		[self addChild:resumeS z:1];</code></pre>
<p>than fadein it in response to button press  </p>
<pre><code>resumeS.opacity = 0;

	       [resumeS runAction:[CCFadeIn actionWithDuration:2]];</code></pre>
<p>and once again fadeout it response to button</p>
<p><code></code>[resumeS runAction:[CCFadeOut actionWithDuration:2]];`<br />
`<br />
but it does not work.....
</p></description>
		</item>

	</channel>
</rss>

