EditBoxDelegate deprecated?

Hi,

I’m trying to get uiEditBox to work, but when I do this (below), I’m told the class is deprecated? I can’t seem to find any tutorials that suggest an updated way!

So -

#ifndef HELLOWORLD_SCENE_H
#define HELLOWORLD_SCENE_H

#include “cocos2d.h”
#include “cocos-ext.h”

USING_NS_CC;
USING_NS_CC_EXT;

class HelloWorld : public cocos2d::Layer,public EditBoxDelegate

gives -

‘EditBoxDelegate’ is deprecated

I believe it’s pointing to the other older one.

make sure you include -

#include "ui/CocosGUI.h"

and use namespace ui in every UI class to distinguish it from the others.
like - ui::EditBoxDelegate

I used it sometime back, it was not deprecated I believe.

1 Like