#ifndef __CHAT_SCENE_H__
#define __CHAT_SCENE_H__

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

class Chat : public cocos2d::Layer
{
protected:
    std::string             m_ChatSentence;
    cocos2d::Label *        m_pLabel;
    MainExecute             m_MainExecute;
    cocos2d::extension::EditBox * m_pEditBox;

public:
    cocos2d::Label *        GetLabel() { return m_pLabel; }

    // 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 menuChatCallback(Ref* pSender);

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

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

#endif // __CHAT_SCENE_H__