Skip to content

Commit

Permalink
use geode's GenericListCell as base for cells
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Aug 24, 2023
1 parent cf1cbee commit 8b5a3f8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/layers/DailyCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void DailyCell::draw() {
}

DailyCell::DailyCell(const char* name, CCSize size) :
TableViewCell(name, size.width, size.height) {}
GenericListCell(name, size) {}

DailyCell* DailyCell::create(const char* key, CCSize size) {
auto ret = new DailyCell(key, size);
Expand Down
2 changes: 1 addition & 1 deletion src/layers/DailyCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using namespace geode::prelude;

class DailyCell : public TableViewCell {
class DailyCell : public GenericListCell {
GJGameLevel* m_level;

void draw() override;
Expand Down
2 changes: 1 addition & 1 deletion src/layers/DailyListView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void DailyListView::loadCell(TableViewCell* cell, int index) {
static_cast<DailyCell*>(cell)->loadFromLevel(
static_cast<GJGameLevel*>(this->m_entries->objectAtIndex(index))
);
static_cast<StatsCell*>(cell)->updateBGColor(index);
static_cast<DailyCell*>(cell)->updateBGColor(index);
}

TableViewCell* DailyListView::getListCell(const char* key) {
Expand Down
2 changes: 1 addition & 1 deletion src/layers/RewardCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void RewardCell::draw() {
}

RewardCell::RewardCell(const char* name, CCSize size) :
TableViewCell(name, size.width, size.height) {}
GenericListCell(name, size) {}

RewardCell* RewardCell::create(const char* key, CCSize size) {
auto ret = new RewardCell(key, size);
Expand Down
2 changes: 1 addition & 1 deletion src/layers/RewardCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using namespace geode::prelude;

class RewardCell : public TableViewCell {
class RewardCell : public GenericListCell {
void draw();

public:
Expand Down
2 changes: 1 addition & 1 deletion src/layers/RewardListView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void RewardListView::loadCell(TableViewCell* cell, int index) {
static_cast<RewardCell*>(cell)->loadFromReward(
static_cast<GJRewardItem*>(this->m_entries->objectAtIndex(index))
);
static_cast<StatsCell*>(cell)->updateBGColor(index);
static_cast<RewardCell*>(cell)->updateBGColor(index);
}

TableViewCell* RewardListView::getListCell(const char* key) {
Expand Down

0 comments on commit 8b5a3f8

Please sign in to comment.