51 lines
1.0 KiB
C++
51 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "TipNode.h"
|
|
#include "extensions/cocos-ext.h"
|
|
|
|
USING_NS_CC;
|
|
using namespace cocos2d::ui;
|
|
|
|
class NoticeScene : public TipNode
|
|
{
|
|
public:
|
|
NoticeScene();
|
|
~NoticeScene();
|
|
|
|
public:
|
|
CREATE_FUNC(NoticeScene);
|
|
virtual bool init();
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual void onEnterTransitionDidFinish();
|
|
|
|
virtual void onExit();
|
|
|
|
// 关闭弹窗;
|
|
void onClickClose(Ref*);
|
|
|
|
// 按键处理;
|
|
void onKeyReleased(EventKeyboard::KeyCode keyCode, Event * pEvent);
|
|
|
|
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32)
|
|
bool onWebViewShouldStartLoading(experimental::ui::WebView *sender, const std::string &url);
|
|
|
|
void onWebViewDidFinishLoading(experimental::ui::WebView *sender, const std::string &url);
|
|
|
|
void onWebViewDidFailLoading(experimental::ui::WebView *sender, const std::string &url);
|
|
|
|
void hideLoadingLayer();
|
|
#endif
|
|
|
|
private:
|
|
Node* m_rootPanel; // 根节点
|
|
|
|
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32)
|
|
cocos2d::experimental::ui::WebView *_webView;
|
|
|
|
LayerColor* m_layerLoading;
|
|
Sprite* m_sprLoading;
|
|
#endif
|
|
|
|
}; |