| 35 | } |
| 36 | |
| 37 | void SongsLayer::customSetup() |
| 38 | { |
| 39 | _listView->setAnchorPoint({ 0.5, 0.5 }); |
| 40 | _listView->setBounceEnabled(true); |
| 41 | _listView->setScrollBarEnabled(false); |
| 42 | |
| 43 | for (size_t i = 0; i < 21; ++i) |
| 44 | { |
| 45 | auto cell = SongCell::create(SongObject::create(i)); |
| 46 | cell->updateBGColor(i); |
| 47 | _listView->pushBackCustomItem(cell); |
| 48 | } |
| 49 | |
| 50 | auto cell = SongCell::create(SongObject::create(-1)); |
| 51 | cell->updateBGColor(-1); |
| 52 | _listView->pushBackCustomItem(cell); |
| 53 | } |
no test coverage detected