Merge pull request #452 from djpohly/hide-inactive-section-fix
Fix CloseCurrentFolder with OnlyShowActiveSection
This commit is contained in:
+6
-4
@@ -677,10 +677,7 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
// todo: preferred sort section color handling? -aj
|
// todo: preferred sort section color handling? -aj
|
||||||
RageColor colorSection = (so==SORT_GROUP) ? SONGMAN->GetSongGroupColor(pSong->m_sGroupName) : SECTION_COLORS.GetValue(iSectionColorIndex);
|
RageColor colorSection = (so==SORT_GROUP) ? SONGMAN->GetSongGroupColor(pSong->m_sGroupName) : SECTION_COLORS.GetValue(iSectionColorIndex);
|
||||||
iSectionColorIndex = (iSectionColorIndex+1) % NUM_SECTION_COLORS;
|
iSectionColorIndex = (iSectionColorIndex+1) % NUM_SECTION_COLORS;
|
||||||
// In certain situations (e.g. simulating Pump it Up), themes may
|
arrayWheelItemDatas.push_back( new MusicWheelItemData(WheelItemDataType_Section, NULL, sThisSection, NULL, colorSection, iSectionCount) );
|
||||||
// want to only show one group at a time.
|
|
||||||
if( !HIDE_INACTIVE_SECTIONS )
|
|
||||||
arrayWheelItemDatas.push_back( new MusicWheelItemData(WheelItemDataType_Section, NULL, sThisSection, NULL, colorSection, iSectionCount) );
|
|
||||||
sLastSection = sThisSection;
|
sLastSection = sThisSection;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1361,9 +1358,14 @@ void MusicWheel::SetOpenSection( RString group )
|
|||||||
for( unsigned i = 0; i < from.size(); ++i )
|
for( unsigned i = 0; i < from.size(); ++i )
|
||||||
{
|
{
|
||||||
MusicWheelItemData &d = *from[i];
|
MusicWheelItemData &d = *from[i];
|
||||||
|
// Don't show songs outside the current group
|
||||||
if( (d.m_Type == WheelItemDataType_Song || d.m_Type == WheelItemDataType_Course) && !d.m_sText.empty() &&
|
if( (d.m_Type == WheelItemDataType_Song || d.m_Type == WheelItemDataType_Course) && !d.m_sText.empty() &&
|
||||||
d.m_sText != group )
|
d.m_sText != group )
|
||||||
continue;
|
continue;
|
||||||
|
// In certain situations (e.g. simulating Pump it Up), themes may
|
||||||
|
// want to hide inactive group headings as well.
|
||||||
|
if( HIDE_INACTIVE_SECTIONS && d.m_Type == WheelItemDataType_Section && group != "" )
|
||||||
|
continue;
|
||||||
|
|
||||||
// If AUTO_SET_STYLE, hide courses that prefer a style that isn't available.
|
// If AUTO_SET_STYLE, hide courses that prefer a style that isn't available.
|
||||||
if( d.m_Type == WheelItemDataType_Course && CommonMetrics::AUTO_SET_STYLE )
|
if( d.m_Type == WheelItemDataType_Course && CommonMetrics::AUTO_SET_STYLE )
|
||||||
|
|||||||
+4
-5
@@ -290,7 +290,7 @@ bool WheelBase::Select() // return true if this selection can end the screen
|
|||||||
{
|
{
|
||||||
case WheelItemDataType_Generic:
|
case WheelItemDataType_Generic:
|
||||||
m_LastSelection = m_CurWheelItemData[m_iSelection];
|
m_LastSelection = m_CurWheelItemData[m_iSelection];
|
||||||
break;
|
return true;
|
||||||
case WheelItemDataType_Section:
|
case WheelItemDataType_Section:
|
||||||
{
|
{
|
||||||
RString sThisItemSectionName = m_CurWheelItemData[m_iSelection]->m_sText;
|
RString sThisItemSectionName = m_CurWheelItemData[m_iSelection]->m_sText;
|
||||||
@@ -305,12 +305,11 @@ bool WheelBase::Select() // return true if this selection can end the screen
|
|||||||
m_soundExpand.Play();
|
m_soundExpand.Play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
// Opening/closing sections cannot end the screen
|
||||||
|
return false;
|
||||||
default:
|
default:
|
||||||
break;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WheelItemBaseData* WheelBase::GetItem( unsigned int iIndex )
|
WheelItemBaseData* WheelBase::GetItem( unsigned int iIndex )
|
||||||
|
|||||||
Reference in New Issue
Block a user