cb213901
xiaoyu
添加一个游戏的源码和编译选项
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
//
// AlertView.h
// HalloweenSpaceInvaders
//
// Created by Katarzyna Kalinowska-Górska on 09/10/2019.
//
#ifndef AlertView_h
#define AlertView_h
#include "cocos2d.h"
#include <string>
class AlertView : public cocos2d::LayerColor {
public:
static AlertView* create(std::string message, std::string okText, std::string cancelText, cocos2d::Color3B okColor, cocos2d::Color3B cancelColor, std::function<void()> onConfirmCallback,std::function<void()> onCancelCallback);
protected:
std::function<void()> _onConfirmCallback;
std::function<void()> _onCancelCallback;
bool init(std::string message, std::string okText, std::string cancelText, cocos2d::Color3B okColor, cocos2d::Color3B cancelColor, std::function<void()> onConfirmCallback,std::function<void()> onCancelCallback);
void setupAppearance(std::string message, std::string okText, std::string cancelText, cocos2d::Color3B okColor, cocos2d::Color3B cancelColor);
void onCancelClicked(cocos2d::Ref* pSender);
void onOKClicked(cocos2d::Ref* pSender);
};
#endif /* AlertView_h */
|