I have my main layer with an options button and when I press the button I am calling pushScene on a CCLayerColor Layer, and the layer is only half the size of the screen because I want it to be like a drop down menu but when it appears with the transition that I have set up, the background layer goes black. I would like the background layer to always stay visible. I am pretty sure that the background layer is getting deallocated.
Asked
Active
Viewed 1,219 times
1 Answers
1
If you use pushScene:
, previous scene will not be deallocated. It will be restored after sending popScene
message. As far as I understood, your disappeared "background layer" is previous scene. Scene that is not on the top of the scene stack will not receive visit
messages, so it simply will not be drawn. Thats why it is disappeared.
Anyway, why do you use another scene for dropdown menu? Create separate layer and simply show/hide or add/remove it when you need.

Morion
- 10,495
- 1
- 24
- 33
-
thanks for the help. Is there no way to make the background layer visible with the other layer that I am pushing on to the stack? – Stephen Nov 27 '12 at 16:23
-
1you say about no layer, but whole scene. normally only one scene draws it's content. – Morion Nov 27 '12 at 17:11
-
Could you explain a little further, I don't know if I understand what you are telling? – Stephen Nov 27 '12 at 18:54