SettingsLayer.h 1.05 KB
//
//  SettingsLayer.h
//  HalloweenSpaceInvaders
//
//  Created by Katarzyna Kalinowska-Górska on 06/10/2019.
//

#ifndef SettingsLayer_h
#define SettingsLayer_h

#include "cocos2d.h"
#include "LevelPickerView.h"
#include "ParentalGateShowInterface.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "AppLinksView.h"
#endif

class SettingsLayer : public cocos2d::LayerColor, public ParentalGateShowInterface {
    
public:
    static SettingsLayer* create(float width, float height, std::function<void(int)> onLevelPickedCallback);
    void prepareForShowing();
    
protected:
    LevelPickerView* _levelPickerView;
    std::function<void(int)> _onLevelPicked;
    
    bool init(float width, float height, std::function<void(int)> onLevelPickedCallback);

#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
    AppLinksView* m_appLinksView;
    void setupAppLinksView(const cocos2d::Point& position);
#endif

    virtual void aboutMenuButtonTapped(cocos2d::Ref* pSender);
    virtual void privacyPolicyMenuButtonTapped(cocos2d::Ref* pSender);
};

#endif /* SettingsLayer_h */