From 163240711fd00aa24af6eb0065187e7c850e50c8 Mon Sep 17 00:00:00 2001 From: Cvolton Date: Tue, 4 Jun 2024 14:59:09 +0200 Subject: [PATCH] add ncs icon to levelcell --- src/LevelCell.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/LevelCell.cpp b/src/LevelCell.cpp index a5ba290..fb23071 100644 --- a/src/LevelCell.cpp +++ b/src/LevelCell.cpp @@ -127,10 +127,15 @@ struct LevelCellIDs : Modify { getChildOfType(m_mainLayer, labelOffset)->setID("song-name"); labelOffset++; + if(auto practiceTxt = ::getChildBySpriteFrameName(m_mainLayer, "ncs_small_001.png")) { + practiceTxt->setID("ncs-icon"); + spriteOffset++; + } + size_t containerSpriteOffset = 0; size_t containerLabelOffset = 0; //we can use label offset because nothing else has been made yet, the +1 is the CCMenu that contains all buttons - auto container = getChildOfType(m_mainLayer, labelOffset + 1); + auto container = getChildOfType(m_mainLayer, labelOffset + spriteOffset + 1); if(container) { container->setID("difficulty-container"); getChildOfType(container, containerSpriteOffset)->setID("difficulty-sprite");