title: Adding a Hud Layer to Scene Cocos2d-3
body: <p>To keep it simple, what is the easiest way to make the default [ Menu ] in default HelloWorld Scene (for example) as it's own layer. Issue I'm having now is that the scene is completely black, with nothing showing up!</p>
  
  <p>GameLayer node:</p>
  
  <pre><code>- (id)init
  {
      // Enable touch handling on scene node
      self.userInteractionEnabled = YES;
      self.theMap     =   [CCTiledMap tiledMapWithFile:@"AftermathRpg.tmx"];
  
      self.contentSize = theMap.contentSize;
  
      self.metaLayer = [theMap layerNamed:@"Meta"];
      metaLayer.visible = NO;
  
      CCTiledMapObjectGroup *objects  =    [theMap objectGroupNamed:@"mainChar"];
      NSMutableDictionary *startPoint =    [objects objectNamed:@"startPosition"];
      int x = [[startPoint valueForKey:@"x"] intValue];
      int y = [[startPoint valueForKey:@"y"] intValue];
  
      self.mainChar     = [CCSprite spriteWithImageNamed:@"mainChar.png"];
      mainChar.position = ccp(x,y);
      [self addChild:mainChar];
  
      [self addChild:theMap z:-1];
      [self setCenterOfScreen: mainChar.position];
  
      return self;
  }
  </code></pre>
  
  <p>HudLayer node</p>
  
  <pre><code>-(id)init
  {
      CGSize winSize = [[CCDirector sharedDirector] viewSize];
  
  
      CCButton *backButton = [CCButton buttonWithTitle:@"[ Menu ]" fontName:@"Verdana-Bold" fontSize:18.0f];
      backButton.position = ccp(0.85f * winSize.width, 0.95f * winSize.height);
      [backButton setTarget:self selector:@selector(onBackClicked:)];
      [self addChild:backButton];
  
      return self;
      }
  </code></pre>
  
  <p>Scene</p>
  
  <pre><code>+ (GameScene *)scene
  {
  
      return [[self alloc] init];
  }    
  - (id)init
  {
      // Apple recommend assigning self with supers return value
      self = [super init];
      if (!self) return(nil);
  
      CGSize winSize = [CCDirector sharedDirector].viewSize;
  
      self.gameLayer = [GameLayer node];
      [self addChild:gameLayer z:-1];
  
      //self.contentSize = self.gameLayer.contentSize;
      hudLayer = [HudLayer node];
      hudLayer.position = ccp(winSize.width * 0.9, winSize.height * 0.9);
  
      [self addChild:hudLayer z:1];
  
  
      return self;
  }
  </code></pre>