AniAlertView.h
1.08 KB
//
// AniAlertView.h
// HalloweenSpaceInvaders
//
// Created by Katarzyna Kalinowska-Górska on 09/10/2019.
//
#ifndef AniAlertView_h
#define AniAlertView_h
#include "cocos2d.h"
#include <string>
class AniAlertView : public cocos2d::LayerColor {
public:
static AniAlertView* 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 /* AniAlertView_h */