Can someone give me a very simple example of Scrolling menu in cocos2dx c++?
This is what I want. A menu on top of an existing Scene with eithe Sprite as options or Menu. There are 3 columns and 5 rows. This should be scroll able vertically.
Any help will be appreciated.
Thank you.
If you look in cpp-tests there are a number of examples for scrolling.
I already looked into it but I am not able to understand the code. I looked it multiple times but no success.
if you don’t understand the code I would advise you to start small and break it down into steps.
create the scroll view
create the menu
add your menu to the scroll view
Some links:
@aron.bordin
hope it will help you .
Layout m_pWidget = dynamic_cast<Layout>(CCUIHELPER-UILayer->createWidgetFromJsonFile(“category/CategoryMap_1.ExportJson”));
m_pUiLayer->addWidget(m_pWidget);
m_pUiLayer->setContentSize( CCSizeMake(1920, 1080));
CCScrollView *scroll = CCScrollView::create(CCSizeMake(1280, 720), m_pUiLayer);
scroll->setDelegate(this);
scroll->setBounceable(false);
this->addChild(scroll);
http://denvycom.com/blog/sliding-menu-in-cocos2d-for-android/
i think i already came across this link but isn’t this code for java? I am working on c++