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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:49:46+00:00 2026-05-30T19:49:46+00:00

I am newbie to Cocos2d. I have this layer that represents my main game

  • 0

I am newbie to Cocos2d. I have this layer that represents my main game scene. Lets talk in terms of Cocos2D default template. In this case, my main game scene would be HelloWorldLayer.

Now I want to present a menu. I have create the menu as an individual subclass of CClayer.

How do I make the menu appear using some kind of transition on top of the main scene?

If I use something like

CCScene *menu = [Menu scene];

[[CCDirector sharedDirector] replaceScene: 
[CCTransitionCrossFade transitionWithDuration:0.5f scene:menu]];

I would be using the menu as a scene and replacing the main scene with it. This is not what I want. I want to make the menu appear on top of the main scene, using some kind of transition and if possible fading the main scene to 50% or whatever.

How do I do that?

thanks.

  • 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-30T19:49:47+00:00Added an answer on May 30, 2026 at 7:49 pm

    Instead of replacing the scene, simply make your Menu class a CCLayer and add it existing scene. You can set opacity and add masking sprites as needed to fade out the bottom layer if you need to.

    CCLayer* newLayer = [Menu layer];
    [self addChild: newLayer];
    

    You will need to handle much of the details on which layer captures input, but this is the basic idea.

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

Sidebar

Related Questions

Newbie question. I have Django models that look like this: class Video(models.Model): uploaded_by =
Newbie to Python, so this may seem silly. I have two dicts: default =
Newbie alert! OK, I have a working central Mercurial repository that I've been working
I'm newbie in mobile development. cocos2d-x Tutorials says: But please note that linux port
Newbie question here but for some reason I cant figure this out. I have
Newbie asking for help: I have an array of numbers that needs to be
Newbie question, let me try and make this as clear as possible. I have
newbie here! I have source data that contains both simplified and traditional Chinese in
newbie question I have a multiselect box that i populate with some ajax and
I am a newbie at Cocos2D and i'm just getting started. I have set

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.