44 lines
908 B
C
44 lines
908 B
C
|
|
#pragma once
|
|||
|
|
#include "TipNode.h"
|
|||
|
|
#include "Singleton.h"
|
|||
|
|
|
|||
|
|
USING_NS_CC;
|
|||
|
|
using namespace cocos2d::ui;
|
|||
|
|
|
|||
|
|
class PopScene : public TipNode, public Singleton<PopScene>
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
PopScene();
|
|||
|
|
~PopScene();
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
CREATE_FUNC(PopScene);
|
|||
|
|
|
|||
|
|
virtual bool init();
|
|||
|
|
|
|||
|
|
virtual void onEnter();
|
|||
|
|
|
|||
|
|
virtual void onEnterTransitionDidFinish();
|
|||
|
|
|
|||
|
|
virtual void onExit();
|
|||
|
|
|
|||
|
|
void pushScene();
|
|||
|
|
|
|||
|
|
void popScene();
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
void show(std::string strContent, const std::function<void()>& fnOKHander = nullptr);
|
|||
|
|
void show(std::string strContent, const std::function<void()>& fnOKHander, const std::function<void()>& fnCancelHander);
|
|||
|
|
void onClickCancel(Ref*);
|
|||
|
|
void onClickOK(Ref*);
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
std::function<void()> m_fnOKHander;
|
|||
|
|
std::function<void()> m_fnCancelHander;
|
|||
|
|
|
|||
|
|
Text* m_txtContent; //<2F>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|||
|
|
Button* m_btnOK; //ȷ<><C8B7><EFBFBD><EFBFBD>ť
|
|||
|
|
Button* m_btnCancel; //ȡ<><C8A1><EFBFBD><EFBFBD>ť
|
|||
|
|
float m_fWndWidth; //<2F><><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD>
|
|||
|
|
ImageView* m_ImgBg;
|
|||
|
|
};
|