I tried Slider Menu Grid. It works very well. Thank you very much providing this wonderful code. I am wondering can you make it as a loop? if I slide menu to the last page if I continue slide the page , can you make it go to first page. same as the first page, if I continue slide the screen, can you make it go to the last page?
If you simply navigate around the pages, then this code will scroll through all the pages are located between the first and last pages. To loop, I need to change the whole scheme of this piece of software. Of course, I think, but nothing yet I promise.
Fixed a bug where a locked item indicated by the touch as the chosen.
Fixed a bug page counter by Mr. K pop (previous message)
Added the ability to be used as a descriptor page of any object pointer CCNode *
P.S. Mr. K pop, your nickname add everywhere in the code
I was super excited to see this class out here, since I think it is pretty close in function to Cocos2d-extension-iPhone’s CCScrollLayer. Thanks Vitaly Shumakov for writing it!
Sadly, it looks like I’m going to have to adjust for the changes in the latest build of Cocos2d-x 2.0 (no more CCMutableArray, etc.).
Has anybody started on such an adjustment? I had thought at first it would be pretty straightforward but as I’ve gone on with it it looks more complicated than I had expected.
I’m trying to use this sliding menu for my game and everything is working great. The only problem is that i cannot let the program know which button in the grid has been pressed. e.g If level 4 has been selected i’d like a function to return the value 4.
I’m trying to use the getTag() function but it always seems to return “–1”
gameConfig.levelSelected = slidingMenu->getTag(); // not working :(
CCMenuItem test1 = slidingMenu->getSelectedItem(); //just trying to find the id
CCDirector::sharedDirector()->replaceScene(CCTransitionFade::transitionWithDuration(1.0f,levelSelect));
Has someone used this sliding menu in cocos2d-2.0-x-2.0.4? I was able to show in the screen, it slides between pages but when a menu item is clicked the callback function is not called. I was debugging the code and I found that the “error” (I do not know if it is an error or something that I am not doing right) is in SlidingMenuGrid::GetItemWithinTouch method, the local ccpoint and the rect generated do not match…
Thanks for this class! very useful!
I just have a question and a suggestion:
Can you give us an example on how to use it?
Also, more comments in cpp file would be much appreciated. Sorry, I come from a school where code comments were mandatory for every line.