123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // PurchaseBannerCell.hpp
- // merge6
- //
- // Created by Black Homles on 2024/9/23.
- //
- #ifndef PurchaseBannerCell_hpp
- #define PurchaseBannerCell_hpp
- #include "cocos2d.h"
- #include "extensions/cocos-ext.h"
- #include "RedreamLoader.hpp"
- #include "PBConfigData.hpp"
- class PurchaseBannerCell :
- public Node,
- public redream::NotifyDevelopmentDelegate {
- public:
- struct sPageCfg {
- int row;
- int col;
- int startId;
- int cnt;
- };
-
- static PurchaseBannerCell* create(string bName);
-
- void setBtnClickCallBack(std::function<void(int,string)> tmpCallBack);
- void setCellStatus();
- void setBannerNO(int bno);
- int getBannerNO();
-
- virtual void onNotifyDevelopment(redream::ReboltRedManager* reboltRedManager, redream::NotifyDevelopmentWaiter* waiter,
- std::string notify, std::string param, bool reboltIsWait, Node* outNode) override;
-
- protected:
- CC_SYNTHESIZE(int, _idx, Idx);
- RedreamLoader* _lyCellBanner = nullptr;
- string _bannerName = "";
- std::function<void(int,string)> _reboltCallBack = nullptr;
- PBConfigData::bannerInfo _bannerInfo;
- int _leftTime = 0;
- int _bannerNO = -1;
-
- void initBanner();
- void scheduleBannerTime(Node* tmpNode);
- string convertSecondIntToHMSString(int iTime);
- };
- #endif /* PurchaseBannerCell_hpp */
|