Hi,
I hope someone will be able to help me with this c*+ question.
I’m porting code responsible for enabling and disabling elements on screen during screen transitions.
Anyway… I’ve got this piece of code in CCNode category which performs following checks:
<pre>
- enableMenus:*enable ofNode:node {
fornode).children) {
if {
for result).children) {
if {
result1).isEnabled =enable;
}
}
</pre>
The rest of the method are just similar checks for different classes.
Is it possible to achieve this using c+? How can I do it? If not, what should I do to have similar check?
Another thing I have stumbled upon during porting was this piece of code from another CCNode category:
self.grid = [[grid_ class] gridWithSize:grid_.gridSize];
I’ve changed that to be:
m_pGrid = (m_pGrid->gridWithSize(m_pGrid->getGridSize()));
but I’m not sure if this is the correct way to do it
Any help will be appreciated.
Thanks a lot!