Skip to content

Commit

Permalink
add proper ncs icon identification code
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Oct 28, 2024
1 parent 94a8d68 commit 2aef314
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/LevelCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ struct LevelCellIDs : Modify<LevelCellIDs, LevelCell> {
getChildOfType<CCLabelBMFont>(m_mainLayer, labelOffset)->setID("song-name");
labelOffset++;

if(auto practiceTxt = ::getChildBySpriteFrameName(m_mainLayer, "ncs_small_001.png")) {
practiceTxt->setID("ncs-icon");
auto MDLM = MusicDownloadManager::sharedState();
auto songObj = MDLM->getSongInfoObject(m_level->m_songID);
if(songObj && songObj->m_nongType == 1) {
getChildOfType<CCSprite>(m_mainLayer, spriteOffset)->setID("ncs-icon");
spriteOffset++;
}

Expand Down

0 comments on commit 2aef314

Please sign in to comment.