-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add BIViewLayer and upgrade DailyViewLayer
- Loading branch information
Showing
4 changed files
with
213 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,18 @@ | ||
#pragma once | ||
|
||
#include "../_bases/CvoltonListView.h" | ||
#include "../_bases/BIViewLayer.h" | ||
#include "DailyCell.h" | ||
#include "../../delegates/PageNumberDelegate.h" | ||
|
||
class DailyViewLayer : public cocos2d::CCLayer, public PageNumberDelegate { | ||
GJListLayer* m_listLayer = nullptr; | ||
cocos2d::CCArray* m_sortedLevels = nullptr; | ||
CCMenuItemSpriteExtra* m_prevBtn = nullptr; | ||
CCMenuItemSpriteExtra* m_nextBtn = nullptr; | ||
cocos2d::CCLabelBMFont* m_counter = nullptr; | ||
ButtonSprite* m_pageBtnSprite = nullptr; | ||
unsigned int m_page = 0; | ||
class DailyViewLayer : public BIViewLayer { | ||
bool m_isWeekly = false; | ||
protected: | ||
virtual bool init(bool isWeekly); | ||
virtual void keyBackClicked(); | ||
void onBack(cocos2d::CCObject*); | ||
void onPrev(cocos2d::CCObject*); | ||
void onNext(cocos2d::CCObject*); | ||
void onJumpToPageLayer(cocos2d::CCObject*); | ||
void onRandom(cocos2d::CCObject*); | ||
void onMore(cocos2d::CCObject*); | ||
int levelsPerPage() const; | ||
public: | ||
virtual void loadPage(unsigned int page); | ||
static DailyViewLayer* create(bool isWeekly); | ||
static bool compareDailies(const void* l1, const void* l2); | ||
static cocos2d::CCScene* scene(bool isWeekly); | ||
virtual int getPage() const; | ||
void keyDown(cocos2d::enumKeyCodes key); | ||
}; |
Oops, something went wrong.