#ifndef __NAME_ENTRY_SCENE_H__
#define __NAME_ENTRY_SCENE_H__

#include "cocos2d.h"
#include "ui/cocosGUI.h"
#include "extensions/cocos-ext.h"

class NameEntry : public cocos2d::Layer
{
protected:
    static std::string 	m_MyName;
    cocos2d::extension::EditBox * m_pEditBox;

public:
    static std::string GetName() { return m_MyName; }

    // there's no 'id' in cpp, so we recommend returning the class instance pointer
    static cocos2d::Scene* createScene();

    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();

    // a selector callback
    void menuCloseCallback(cocos2d::Ref* pSender);
    void menuStartChatCallback(cocos2d::Ref* pSender);

    // implement the "static create()" method manually
    CREATE_FUNC(NameEntry);

    /**
     *	ゲームループです。タイマー割り込みで周期的に実行します。
     *
     *	@param	delta	変化時間
     */
    virtual void update(float delta);
};

#endif // __NAME_ENTRY_SCENE_H__