Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3404546
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:23:46+00:00 2026-05-18T05:23:46+00:00

I’m creating an universal application and my CCMenu appears just fine on both iPhone,

  • 0

I’m creating an universal application and my CCMenu appears just fine on both iPhone, iPhone 4 and iPad. However the buttons do nothing when touched on the iPad.

I have no specific iPad code other than modifying the contentScaling property so that the iPad uses the same images as the iPhone 4. This means that the same images work on iPhone 4 but not on the iPad.

I am using cocos2d 0.99.rc0 and the iOS 4.1 SDK. I don’t even know where to start troubleshooting this.

The only oddity i noticed recently is that the iPad seems to draw the menu scene once, then quickly redraws it for some reason, moving everything one pixel or something. My menu class is very simple and has no “refreshing” code or anything that is supposed to move. This doesnt happen on either low or high res iPhones.

Here is my code, sloppy but yet very simple.

MainMenu.m:

    CCMenuItemImage * playItem = [self makeMenuButtonWithSprite:@"Play.png" withSelector:@selector(play:)];

    CCMenuItemImage * resumeItem = [self makeMenuButtonWithSprite:@"Resume.png" withSelector:@selector(resume:)];

    CCMenuItemImage * optionsItem = [self makeMenuButtonWithSprite:@"Options.png" withSelector:@selector(options:)];

    CCMenuItemImage * helpItem = [self makeMenuButtonWithSprite:@"Help.png" withSelector:@selector(help:)];

    CCMenu *myMenu;

    // Check if there is a valid savegame by comparing versions.
    if ([[uD stringForKey:@"CFBundleVersion"] isEqualToString:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] ) {
        myMenu = [CCMenu menuWithItems:playItem, resumeItem, optionsItem, helpItem, nil];
    } else {
        myMenu = [CCMenu menuWithItems:playItem, optionsItem, helpItem, nil];
    }

    // Arrange the menu items vertically
    [myMenu alignItemsVerticallyWithPadding:0.0f];
    myMenu.position = ccp(dB.wWidth/2,dB.wHeight/2);

    // add the menu to your scene
    [self addChild:myMenu z:100];

And the CCMenuItemImage factory:

- (CCMenuItemImage *)makeMenuButtonWithSprite:(NSString *)spriteFileName withSelector:(SEL)selector {
    CCSprite *spriteForButton = [CCSprite spriteWithFile:spriteFileName];
    spriteForButton.anchorPoint = ccp(0.5f,0.5f);
    CCMenuItemImage * buttonImage =[CCMenuItemImage itemFromNormalImage:@"button.png"
                                                      selectedImage: @"button.png"
                                                             target:self
                                                           selector:selector];
    [buttonImage addChild:spriteForButton z:100];
    spriteForButton.position = ccp([buttonImage boundingBox].size.width/2,([buttonImage boundingBox].size.height/2)-5);
    return buttonImage;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:23:47+00:00Added an answer on May 18, 2026 at 5:23 am

    Problem found. This was related to my custom hack to make the iPad load retina graphics. The problem was in my appDelegate where i set the contentScaleFactor which made ccDirector scale and UIScreen scale mismatch.

    Problem boiled down to graphics being big but cocos2d thinking that coordinates are low res.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.