<?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; Topic: MenuItem color issue</title>
		<link>http://www.cocos2d-iphone.org/forum/topic/1836</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 02:03:28 +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/topic/1836" rel="self" type="application/rss+xml" />

		<item>
			<title>PhilM on "MenuItem color issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/1836#post-11494</link>
			<pubDate>Sun, 13 Sep 2009 01:37:25 +0000</pubDate>
			<dc:creator>PhilM</dc:creator>
			<guid isPermaLink="false">11494@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Good find with the MenuItemLabel. Glad you got it working ; )</p>
<p>I find it handy to have the release notes open (along with the api) when updating my code, or using code samples from old posts, or tutorials. </p>
<p>E.g. </p>
<p>for 0.8.0 (that your currently using):<br />
<a href="http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:0_8" rel="nofollow">http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:0_8</a> </p>
<p>or for the latest 0.8.1:<br />
<a href="http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:0_8_1" rel="nofollow">http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:0_8_1</a></p>
<p>Apologies if you already do this, there's alot of changes to take in between releases, so it can be easy to miss bits!
</p></description>
		</item>
		<item>
			<title>artem on "MenuItem color issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/1836#post-11493</link>
			<pubDate>Sun, 13 Sep 2009 01:22:19 +0000</pubDate>
			<dc:creator>artem</dc:creator>
			<guid isPermaLink="false">11493@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>It helped me too!</p>
<p>Thanks!
</p></description>
		</item>
		<item>
			<title>rbrooky on "MenuItem color issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/1836#post-11487</link>
			<pubDate>Sat, 12 Sep 2009 23:26:33 +0000</pubDate>
			<dc:creator>rbrooky</dc:creator>
			<guid isPermaLink="false">11487@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks PhilM,</p>
<p>I tried:<br />
	[globalItem setColor: ccc3(200,200,200)];</p>
<p>but it is giving me the same warning: MenuItem may not respond to setColor<br />
 (Messages without a matching method signature will be assumed id.... etc)</p>
<p>I'm using cocos2d v8.0</p>
<p>I just found a solution though:<br />
I declared globalItem in the header file as MenuItem *globalItem. Declaring it as MenuItemLabel *globalItem and then using setColor as you suggested removes the warnings.</p>
<p>Thanks for your help. I like to keep my code as clean as possible with no warnings...
</p></description>
		</item>
		<item>
			<title>PhilM on "MenuItem color issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/1836#post-11486</link>
			<pubDate>Sat, 12 Sep 2009 23:07:41 +0000</pubDate>
			<dc:creator>PhilM</dc:creator>
			<guid isPermaLink="false">11486@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>what version of cocos2d are you using?</p>
<p>I think setRGB was replaced with setColor (e.g. 'setColor:ccc3(200, 0, 0)') in the 0.8.x versions. Not sure if thats possibly the problem.
</p></description>
		</item>
		<item>
			<title>rbrooky on "MenuItem color issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/1836#post-11484</link>
			<pubDate>Sat, 12 Sep 2009 22:56:34 +0000</pubDate>
			<dc:creator>rbrooky</dc:creator>
			<guid isPermaLink="false">11484@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi,<br />
I have a question regarding changing the color of a menu item after it is selected. This is my code:</p>
<p>in init:<br />
		MenuItem *glob = [MenuItemFont itemFromString:@"Global"<br />
												   target:self<br />
												 selector:@selector(global:)];<br />
		 Menu *menu = [Menu menuWithItems:loc, fr, glob, mn, mail, nil];<br />
		globalItem = [glob retain];</p>
<p>(I have left out some code that sets up the other menu items)</p>
<p>Then in the "global" method:<br />
	[globalItem setRGB:200 :0 :0];</p>
<p>This changed the color of the menu item global to red. Works fine but it gives a warning. I do this quite a few times and so I have a whole list of warnings that I would like to get rid of. Warning is:<br />
"MenuItem may not respond to setRGB" even though it does</p>
<p>Anyone any suggestions how to avoid the warnings?<br />
Thanks!
</p></description>
		</item>

	</channel>
</rss>

