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 8640795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:21:59+00:00 2026-06-12T11:21:59+00:00

I’ve created a slide out settings menu for my iPhone app using Cocos2D, by

  • 0

I’ve created a slide out settings menu for my iPhone app using Cocos2D, by having a layer with a settings menu on it move out over another layer which has the game menu, it’s all working perfectly… however you can still click the menu items on the game menu through the settings menu, which to be frank I don’t want to be able to do 😉 Is there any easy way to set menu items so they don’t respond to user input? Or should i create a see-through overlay menu item in the settings menu which will absorb any touches?

Here’s my code:

- (void)addButtons: (int) screenSize {


    CCMenuItemImage *goPlay = [CCMenuItemImage  itemWithNormalImage:@"playButtonUnpressed.png"
                                                  selectedImage:@"playButtonPressed.png"
                                                         target:self
                                                       selector:@selector(onPlay:)];
CCMenuItemImage *goSettings = [CCMenuItemImage itemWithNormalImage:@"settingsButtonUnpressed.png"
                                                     selectedImage:@"settingsButtonPressed.png"
                                                            target: self
                                                          selector:@selector(onSettings:)];
CCMenuItemImage *goFacebook = [CCMenuItemImage itemWithNormalImage:@"facebook.png"
                                                     selectedImage:@"facebook.png"
                                                            target: self
                                                          selector:@selector(onFacebook:)];
CCMenuItemImage *goTwitter = [CCMenuItemImage itemWithNormalImage:@"twitter.png"
                                                    selectedImage:@"twitter.png"
                                                           target: self
                                                         selector:@selector(onTwitter:)];
CCMenuItemImage *goWebsite = [CCMenuItemImage itemWithNormalImage:@"website.png"
                                                    selectedImage:@"website.png"
                                                           target: self
                                                         selector:@selector(onWebsite:)];
 CCMenu *play = [CCMenu menuWithItems: goPlay,goSettings,goFacebook,goTwitter,goWebsite,nil];

[self addChild: play];
// Add menu image to menu
play.position = ccp(0,0);

if (self.iPad) {

    goPlay.position = ccp(64, 64);
    goSettings.position = ccp(128,128);

    // Add menu to this scene
}
else if (screenSize < 490){

    goPlay.position = ccp(85, 85);
    goSettings.position = ccp(235,85);
    goFacebook.position = ccp(275,445);
    goTwitter.position = ccp(275,402);
    goWebsite.position = ccp(275,359);

    // Add menu to this scene
}
}

- (void) onSettings: (id) sender{
CGPoint onScreenPoint = ccp(0, 0);
id actionMove = [CCMoveTo actionWithDuration:0.3
                                    position:onScreenPoint];
[_settings runAction:[CCSequence actions:actionMove, nil]];
}

Let me know if you need to see anything else… But I’m pretty sure a solution can be given with the above code 🙂

  • 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-06-12T11:22:01+00:00Added an answer on June 12, 2026 at 11:22 am

    You could create a bool check in the game layer menus’ check to see if their touched. For example since your using the CCMenus just add it inside the selector:

    if(!settingsMenuOut)//checks to see if settingsMenuOut (a bool) is false,
                        //if its true it won't do whatever it normally would.
    { 
       //do the menu stuff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am using Paperclip to handle profile photo uploads in my app. They upload
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I know there's a lot of other questions out there that deal with this

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.