[MusicWheel] added UseSectionsWithPreferredGroup metric (allows sm-ssc to display all song groups if you use the songgroup GameCommand, instead of no groups.)
This commit is contained in:
@@ -671,6 +671,7 @@ NumColumns=0
|
|||||||
FadeSeconds=1
|
FadeSeconds=1
|
||||||
SwitchSeconds=0.10
|
SwitchSeconds=0.10
|
||||||
RandomPicksLockedSongs=true
|
RandomPicksLockedSongs=true
|
||||||
|
UseSectionsWithPreferredGroup=false
|
||||||
#
|
#
|
||||||
RouletteSwitchSeconds=0.05
|
RouletteSwitchSeconds=0.05
|
||||||
RouletteSlowDownSwitches=5
|
RouletteSlowDownSwitches=5
|
||||||
|
|||||||
@@ -1784,6 +1784,8 @@ ChoiceMediumMeter="sort,MediumMeter"
|
|||||||
ChoiceHardMeter="sort,HardMeter"
|
ChoiceHardMeter="sort,HardMeter"
|
||||||
ChoiceLength="sort,Length"
|
ChoiceLength="sort,Length"
|
||||||
UseEasyMarkerFlag=false
|
UseEasyMarkerFlag=false
|
||||||
|
# added for sm-ssc
|
||||||
|
UseSectionsWithPreferredGroup=false
|
||||||
|
|
||||||
[RoomWheel]
|
[RoomWheel]
|
||||||
Fallback="MusicWheel"
|
Fallback="MusicWheel"
|
||||||
|
|||||||
+19
-9
@@ -78,6 +78,7 @@ void MusicWheel::Load( RString sType )
|
|||||||
MODE_MENU_CHOICE_NAMES .Load(sType,"ModeMenuChoiceNames");
|
MODE_MENU_CHOICE_NAMES .Load(sType,"ModeMenuChoiceNames");
|
||||||
SORT_ORDERS .Load(sType,"SortOrders");
|
SORT_ORDERS .Load(sType,"SortOrders");
|
||||||
SHOW_EASY_FLAG .Load(sType,"UseEasyMarkerFlag");
|
SHOW_EASY_FLAG .Load(sType,"UseEasyMarkerFlag");
|
||||||
|
USE_SECTIONS_WITH_PREFERRED_GROUP .Load(sType,"UseSectionsWithPreferredGroup");
|
||||||
vector<RString> vsModeChoiceNames;
|
vector<RString> vsModeChoiceNames;
|
||||||
split( MODE_MENU_CHOICE_NAMES, ",", vsModeChoiceNames );
|
split( MODE_MENU_CHOICE_NAMES, ",", vsModeChoiceNames );
|
||||||
CHOICE .Load(sType,CHOICE_NAME,vsModeChoiceNames);
|
CHOICE .Load(sType,CHOICE_NAME,vsModeChoiceNames);
|
||||||
@@ -172,9 +173,16 @@ void MusicWheel::BeginScreen()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(GAMESTATE->m_sPreferredSongGroup != GROUP_ALL)
|
||||||
|
{
|
||||||
|
// if we have a preferred song group set, we should go there.
|
||||||
|
SetOpenSection(GAMESTATE->m_sPreferredSongGroup);
|
||||||
|
}
|
||||||
|
else if( !SelectSongOrCourse() )
|
||||||
|
{
|
||||||
// Select the the previously selected song (if any)
|
// Select the the previously selected song (if any)
|
||||||
if( !SelectSongOrCourse() )
|
|
||||||
SetOpenSection("");
|
SetOpenSection("");
|
||||||
|
}
|
||||||
|
|
||||||
// rebuild the WheelItems that appear on screen
|
// rebuild the WheelItems that appear on screen
|
||||||
RebuildWheelItems();
|
RebuildWheelItems();
|
||||||
@@ -187,9 +195,9 @@ MusicWheel::~MusicWheel()
|
|||||||
delete *i;
|
delete *i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If a song or course is set in GAMESTATE and available, select it. Otherwise, choose the
|
/* If a song or course is set in GAMESTATE and available, select it. Otherwise,
|
||||||
* first available song or course. Return true if an item was set, false if no items are
|
* choose the first available song or course. Return true if an item was set,
|
||||||
* available. */
|
* false if no items are available. */
|
||||||
bool MusicWheel::SelectSongOrCourse()
|
bool MusicWheel::SelectSongOrCourse()
|
||||||
{
|
{
|
||||||
if( GAMESTATE->m_pPreferredSong && SelectSong( GAMESTATE->m_pPreferredSong ) )
|
if( GAMESTATE->m_pPreferredSong && SelectSong( GAMESTATE->m_pPreferredSong ) )
|
||||||
@@ -453,6 +461,9 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
break;
|
break;
|
||||||
case SORT_GROUP:
|
case SORT_GROUP:
|
||||||
SongUtil::SortSongPointerArrayByGroupAndTitle( arraySongs );
|
SongUtil::SortSongPointerArrayByGroupAndTitle( arraySongs );
|
||||||
|
if(USE_SECTIONS_WITH_PREFERRED_GROUP)
|
||||||
|
bUseSections = true;
|
||||||
|
else
|
||||||
bUseSections = GAMESTATE->m_sPreferredSongGroup == GROUP_ALL;
|
bUseSections = GAMESTATE->m_sPreferredSongGroup == GROUP_ALL;
|
||||||
break;
|
break;
|
||||||
case SORT_TITLE:
|
case SORT_TITLE:
|
||||||
@@ -520,8 +531,8 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
|
|
||||||
if( bUseSections )
|
if( bUseSections )
|
||||||
{
|
{
|
||||||
// Sorting twice isn't necessary. Instead, modify the compatator functions
|
// Sorting twice isn't necessary. Instead, modify the compatator
|
||||||
// in Song.cpp to have the desired effect. -Chris
|
// functions in Song.cpp to have the desired effect. -Chris
|
||||||
/* Keeping groups together with the sorts is tricky and brittle; we
|
/* Keeping groups together with the sorts is tricky and brittle; we
|
||||||
* keep getting OTHER split up without this. However, it puts the
|
* keep getting OTHER split up without this. However, it puts the
|
||||||
* Grade and BPM sorts in the wrong order, and they're already correct,
|
* Grade and BPM sorts in the wrong order, and they're already correct,
|
||||||
@@ -1040,7 +1051,7 @@ void MusicWheel::SetOpenSection( RString group )
|
|||||||
d.m_sText != group )
|
d.m_sText != group )
|
||||||
continue;
|
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 == TYPE_COURSE && CommonMetrics::AUTO_SET_STYLE )
|
if( d.m_Type == TYPE_COURSE && CommonMetrics::AUTO_SET_STYLE )
|
||||||
{
|
{
|
||||||
const Style *pStyle = d.m_pCourse->GetCourseStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined() );
|
const Style *pStyle = d.m_pCourse->GetCourseStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined() );
|
||||||
@@ -1051,7 +1062,7 @@ void MusicWheel::SetOpenSection( RString group )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only show tutorial songs in arcade */
|
// Only show tutorial songs in arcade
|
||||||
if( GAMESTATE->m_PlayMode!=PLAY_MODE_REGULAR &&
|
if( GAMESTATE->m_PlayMode!=PLAY_MODE_REGULAR &&
|
||||||
d.m_pSong &&
|
d.m_pSong &&
|
||||||
d.m_pSong->IsTutorial() )
|
d.m_pSong->IsTutorial() )
|
||||||
@@ -1123,7 +1134,6 @@ RString MusicWheel::JumpToPrevGroup()
|
|||||||
return m_CurWheelItemData[i]->m_sText;
|
return m_CurWheelItemData[i]->m_sText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG->Trace("NO I'M NOT OK!!!");
|
|
||||||
// and this would be el bad:
|
// and this would be el bad:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ protected:
|
|||||||
ThemeMetric1D<RageColor> SECTION_COLORS;
|
ThemeMetric1D<RageColor> SECTION_COLORS;
|
||||||
ThemeMetric<LuaReference> SORT_ORDERS;
|
ThemeMetric<LuaReference> SORT_ORDERS;
|
||||||
ThemeMetric<bool> SHOW_EASY_FLAG;
|
ThemeMetric<bool> SHOW_EASY_FLAG;
|
||||||
|
ThemeMetric<bool> USE_SECTIONS_WITH_PREFERRED_GROUP;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user