Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed #1049 CCMenuItemToggle will grow large after quick clicking

  • Loading branch information...
commit 0b4bb213e28c8787b022e6e6e8771c2387d231fe 1 parent b4d6d08
@flyingpacer flyingpacer authored
View
4 cocos2d-xna/menu_nodes/CCMenuItemLabel.cs
@@ -174,9 +174,9 @@ public override void unselected()
if (m_bIsEnabled)
{
base.unselected();
- //this.stopActionByTag((int)kZoomActionTag);
+ this.stopActionByTag(unchecked((int)kZoomActionTag));
CCAction zoomAction = CCScaleTo.actionWithDuration(0.1f, m_fOriginalScale);
- //zoomAction.tag=kZoomActionTag;
+ zoomAction.tag = unchecked((int)kZoomActionTag);
this.runAction(zoomAction);
}
}
View
4 cocos2d-xna/menu_nodes/CCMenuItemToggle.cs
@@ -28,7 +28,7 @@ THE SOFTWARE.
using System.Linq;
using System.Text;
-namespace cocos2d.menu_nodes
+namespace cocos2d
{
/// <summary>
/// A CCMenuItemToggle
@@ -99,7 +99,7 @@ public int SelectedIndex
this.removeChildByTag(CCMenuItem.kCurrentItem, false);
CCMenuItem item = m_pSubItems[m_uSelectedIndex];
this.addChild(item, 0, CCMenuItem.kCurrentItem);
- CCSize s = item.contentSize;
+ CCSize s = new CCSize(item.contentSize.width, item.contentSize.height);
this.contentSize = s;
item.position = new CCPoint(s.width / 2, s.height / 2);
}
View
1  tests/tests/classes/tests/MenuTest/MenuLayer4.cs
@@ -27,7 +27,6 @@ THE SOFTWARE.
using System.Linq;
using System.Text;
using cocos2d;
-using cocos2d.menu_nodes;
namespace tests
{

0 comments on commit 0b4bb21

Please sign in to comment.
Something went wrong with that request. Please try again.