ccmenu

CCMenu responds to touches when touched elsewhere

旧巷老猫 提交于 2019-12-08 07:56:49
问题 This is the code I'm using to display the menu. CCMenu *topMenu = [CCMenu menuWithItems:menuItem1, menuItem2, menuItem3, menuItem4, menuItem5, menuItem6, menuItem7, menuItem8, nil]; [topMenu alignItemsHorizontallyWithPadding:0.0f]; topMenu.position = ccp(winSize.width/2, 725); [self addChild:topMenu]; I'm sure that this menu gets added only once. But for some strange reasons, touching on the area shown in the attached photo activates my menu. (You can see the "Home" menu item selected when my

CCMenu responds to touches when touched elsewhere

大憨熊 提交于 2019-12-06 15:28:42
This is the code I'm using to display the menu. CCMenu *topMenu = [CCMenu menuWithItems:menuItem1, menuItem2, menuItem3, menuItem4, menuItem5, menuItem6, menuItem7, menuItem8, nil]; [topMenu alignItemsHorizontallyWithPadding:0.0f]; topMenu.position = ccp(winSize.width/2, 725); [self addChild:topMenu]; I'm sure that this menu gets added only once. But for some strange reasons, touching on the area shown in the attached photo activates my menu. (You can see the "Home" menu item selected when my finger is totally somewhere else. Touching on areas slightly to the right makes the "Level" menu

CCMenu misplaced under iOS 7

偶尔善良 提交于 2019-12-02 00:11:00
问题 Under iOS 6 all my CCMenus appeared centered on the screen by default, if I did not assign an explicit position. Under iOS 7 the menus are positioned off screen . Do I have to assign an explicit position under iOS 7? iOS 6: iOS 7: 回答1: Basically there are two underlying problems . If you have hidden your status bar under iOS 6, this will not work for iOS 7 without adding an additional value to your Info.plist (View controller-based status bar appearance -> NO) Due to a bug in Cocos2D your