AppLinksView.h
1018 Bytes
//
// Created by Katarzyna Kalinowska-Górska on 2019-10-07.
//
#ifndef APP_LINKS_VIEW_H
#define APP_LINKS_VIEW_H
#include "cocos2d.h"
#include "ParentalGateShowInterface.h"
#include "ui/CocosGUI.h"
class AppLinksView : public cocos2d::ui::ScrollView {
public:
struct AppLinkData {
AppLinkData(std::string p_iconFilePath, std::string p_storeId) : iconFilePath(p_iconFilePath), storeId(p_storeId) {}
std::string iconFilePath;
std::string storeId;
};
static AppLinksView* create(float width, float height, const std::vector<AppLinkData>& appsData, ParentalGateShowInterface* p_delegate);
static AppLinksView* create(const std::vector<AppLinkData>& appsData, ParentalGateShowInterface* p_delegate);
protected:
std::vector<cocos2d::Sprite*> m_halos;
bool init(float width, float height, const std::vector<AppLinkData>& appsData, ParentalGateShowInterface* p_delegate);
ParentalGateShowInterface* m_delegate {nullptr};
};
#endif //APP_LINKS_VIEW_H