Two part can be cancelled with menuup/down, todo: make it a metric
This commit is contained in:
@@ -724,7 +724,10 @@ UseSectionsWithPreferredGroup=false
|
|||||||
RouletteSwitchSeconds=0.05
|
RouletteSwitchSeconds=0.05
|
||||||
RouletteSlowDownSwitches=5
|
RouletteSlowDownSwitches=5
|
||||||
LockedInitialVelocity=15
|
LockedInitialVelocity=15
|
||||||
|
#
|
||||||
|
OnlyShowActiveSection=true
|
||||||
|
RemindWheelPositions=true
|
||||||
|
#
|
||||||
ScrollBarHeight=300
|
ScrollBarHeight=300
|
||||||
ScrollBarOnCommand=visible,false
|
ScrollBarOnCommand=visible,false
|
||||||
#
|
#
|
||||||
@@ -1767,6 +1770,10 @@ ChangeStepsWithGameButtons=false
|
|||||||
PreviousDifficultyButton="MenuUp"
|
PreviousDifficultyButton="MenuUp"
|
||||||
NextDifficultyButton="MenuDown"
|
NextDifficultyButton="MenuDown"
|
||||||
#
|
#
|
||||||
|
ChangeGroupsWithGameButtoms=false
|
||||||
|
PreviousDifficultyButton="MenuUp"
|
||||||
|
NextDifficultyButton="MenuDown"
|
||||||
|
#
|
||||||
TwoPartSelection=false
|
TwoPartSelection=false
|
||||||
TwoPartConfirmsOnly=false
|
TwoPartConfirmsOnly=false
|
||||||
TwoPartTimerSeconds=15
|
TwoPartTimerSeconds=15
|
||||||
|
|||||||
+53
-8
@@ -80,6 +80,7 @@ void MusicWheel::Load( RString sType )
|
|||||||
SHOW_EASY_FLAG .Load(sType,"UseEasyMarkerFlag");
|
SHOW_EASY_FLAG .Load(sType,"UseEasyMarkerFlag");
|
||||||
USE_SECTIONS_WITH_PREFERRED_GROUP .Load(sType,"UseSectionsWithPreferredGroup");
|
USE_SECTIONS_WITH_PREFERRED_GROUP .Load(sType,"UseSectionsWithPreferredGroup");
|
||||||
HIDE_INACTIVE_SECTIONS .Load(sType,"OnlyShowActiveSection");
|
HIDE_INACTIVE_SECTIONS .Load(sType,"OnlyShowActiveSection");
|
||||||
|
REMIND_WHEEL_POSITIONS .Load(sType,"RemindWheelPositions");
|
||||||
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);
|
||||||
@@ -193,6 +194,20 @@ void MusicWheel::BeginScreen()
|
|||||||
SetOpenSection("");
|
SetOpenSection("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( REMIND_WHEEL_POSITIONS && HIDE_INACTIVE_SECTIONS )
|
||||||
|
{
|
||||||
|
// store the group song index, run this also here because it forgets the current position when
|
||||||
|
// not changing the song if you came back from gameplay or your last round song (profiles)
|
||||||
|
// is not the first one in the group.
|
||||||
|
for( unsigned idx = 0 ; idx < m_viWheelPositions.size() ; idx++ )
|
||||||
|
{
|
||||||
|
if( m_sExpandedSectionName == SONGMAN->GetSongGroupByIndex(idx) )
|
||||||
|
{
|
||||||
|
m_viWheelPositions[idx] = m_iSelection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// rebuild the WheelItems that appear on screen
|
// rebuild the WheelItems that appear on screen
|
||||||
RebuildWheelItems();
|
RebuildWheelItems();
|
||||||
}
|
}
|
||||||
@@ -897,6 +912,18 @@ void MusicWheel::ChangeMusic( int iDist )
|
|||||||
m_iSelection += iDist;
|
m_iSelection += iDist;
|
||||||
wrap( m_iSelection, m_CurWheelItemData.size() );
|
wrap( m_iSelection, m_CurWheelItemData.size() );
|
||||||
|
|
||||||
|
if( REMIND_WHEEL_POSITIONS && HIDE_INACTIVE_SECTIONS )
|
||||||
|
{
|
||||||
|
// store the group song index
|
||||||
|
for( unsigned idx = 0 ; idx < m_viWheelPositions.size() ; idx++ )
|
||||||
|
{
|
||||||
|
if( m_sExpandedSectionName == SONGMAN->GetSongGroupByIndex(idx) )
|
||||||
|
{
|
||||||
|
m_viWheelPositions[idx] = m_iSelection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RebuildWheelItems( iDist );
|
RebuildWheelItems( iDist );
|
||||||
|
|
||||||
m_fPositionOffsetFromSelection += iDist;
|
m_fPositionOffsetFromSelection += iDist;
|
||||||
@@ -1076,6 +1103,10 @@ void MusicWheel::SetOpenSection( RString group )
|
|||||||
//LOG->Trace( "SetOpenSection %s", group.c_str() );
|
//LOG->Trace( "SetOpenSection %s", group.c_str() );
|
||||||
m_sExpandedSectionName = group;
|
m_sExpandedSectionName = group;
|
||||||
|
|
||||||
|
// wheel positions = num song groups
|
||||||
|
if ( REMIND_WHEEL_POSITIONS && HIDE_INACTIVE_SECTIONS )
|
||||||
|
m_viWheelPositions.resize( SONGMAN->GetNumSongGroups() );
|
||||||
|
|
||||||
const WheelItemBaseData *old = NULL;
|
const WheelItemBaseData *old = NULL;
|
||||||
if( !m_CurWheelItemData.empty() )
|
if( !m_CurWheelItemData.empty() )
|
||||||
old = GetCurWheelItemData(m_iSelection);
|
old = GetCurWheelItemData(m_iSelection);
|
||||||
@@ -1114,16 +1145,29 @@ void MusicWheel::SetOpenSection( RString group )
|
|||||||
m_CurWheelItemData.push_back(&d);
|
m_CurWheelItemData.push_back(&d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//restore the past group song index
|
||||||
// Try to select the item that was selected before changing groups
|
if( REMIND_WHEEL_POSITIONS && HIDE_INACTIVE_SECTIONS )
|
||||||
m_iSelection = 0;
|
|
||||||
|
|
||||||
for( unsigned i=0; i<m_CurWheelItemData.size(); i++ )
|
|
||||||
{
|
{
|
||||||
if( m_CurWheelItemData[i] == old )
|
for( unsigned idx = 0 ; idx < m_viWheelPositions.size() ; idx++ )
|
||||||
{
|
{
|
||||||
m_iSelection=i;
|
if( m_sExpandedSectionName == SONGMAN->GetSongGroupByIndex(idx) )
|
||||||
break;
|
{
|
||||||
|
m_iSelection = m_viWheelPositions[idx];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Try to select the item that was selected before changing groups
|
||||||
|
m_iSelection = 0;
|
||||||
|
|
||||||
|
for( unsigned i=0; i<m_CurWheelItemData.size(); i++ )
|
||||||
|
{
|
||||||
|
if( m_CurWheelItemData[i] == old )
|
||||||
|
{
|
||||||
|
m_iSelection=i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1136,6 +1180,7 @@ RString MusicWheel::JumpToNextGroup()
|
|||||||
// Thanks to Juanelote for this logic:
|
// Thanks to Juanelote for this logic:
|
||||||
if( HIDE_INACTIVE_SECTIONS )
|
if( HIDE_INACTIVE_SECTIONS )
|
||||||
{
|
{
|
||||||
|
//todo: make it work with other sort types
|
||||||
unsigned iNumGroups = SONGMAN->GetNumSongGroups();
|
unsigned iNumGroups = SONGMAN->GetNumSongGroups();
|
||||||
|
|
||||||
for(unsigned i = 0 ; i < iNumGroups ; i++)
|
for(unsigned i = 0 ; i < iNumGroups ; i++)
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ protected:
|
|||||||
// sm-ssc additions:
|
// sm-ssc additions:
|
||||||
ThemeMetric<bool> USE_SECTIONS_WITH_PREFERRED_GROUP;
|
ThemeMetric<bool> USE_SECTIONS_WITH_PREFERRED_GROUP;
|
||||||
ThemeMetric<bool> HIDE_INACTIVE_SECTIONS;
|
ThemeMetric<bool> HIDE_INACTIVE_SECTIONS;
|
||||||
|
ThemeMetric<bool> REMIND_WHEEL_POSITIONS;
|
||||||
|
vector <int> m_viWheelPositions;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+65
-20
@@ -635,7 +635,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
// yeah, wanted this since a while ago... -DaisuMaster
|
// yeah, wanted this since a while ago... -DaisuMaster
|
||||||
if( CHANGE_STEPS_WITH_GAME_BUTTONS )
|
if( CHANGE_STEPS_WITH_GAME_BUTTONS )
|
||||||
{
|
{
|
||||||
// avoid anything not being just press (read: release or repeat/hold)
|
// Avoid any event not being first press
|
||||||
if( input.type != IET_FIRST_PRESS )
|
if( input.type != IET_FIRST_PRESS )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -657,8 +657,8 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Actually I don't like to just copy and paste code because it may go wrong
|
||||||
// Most likely a copypasta of the previous addition -DaisuMaster
|
// if something goes overlooked -DaisuMaster
|
||||||
if( CHANGE_GROUPS_WITH_GAME_BUTTONS )
|
if( CHANGE_GROUPS_WITH_GAME_BUTTONS )
|
||||||
{
|
{
|
||||||
if( input.type != IET_FIRST_PRESS)
|
if( input.type != IET_FIRST_PRESS)
|
||||||
@@ -672,14 +672,14 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
m_soundLocked.Play();
|
m_soundLocked.Play();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// for real: copypasta
|
|
||||||
RString sNewGroup = m_MusicWheel.JumpToPrevGroup();
|
RString sNewGroup = m_MusicWheel.JumpToPrevGroup();
|
||||||
m_MusicWheel.SelectSection(sNewGroup);
|
m_MusicWheel.SelectSection(sNewGroup);
|
||||||
m_MusicWheel.SetOpenSection(sNewGroup);
|
m_MusicWheel.SetOpenSection(sNewGroup);
|
||||||
|
MESSAGEMAN->Broadcast("PreviousGroup");
|
||||||
AfterMusicChange();
|
AfterMusicChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(input.MenuI == m_GameButtonNextGroup )
|
else if(input.MenuI == m_GameButtonNextGroup )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||||
m_soundLocked.Play();
|
m_soundLocked.Play();
|
||||||
@@ -688,6 +688,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
RString sNewGroup = m_MusicWheel.JumpToNextGroup();
|
RString sNewGroup = m_MusicWheel.JumpToNextGroup();
|
||||||
m_MusicWheel.SelectSection(sNewGroup);
|
m_MusicWheel.SelectSection(sNewGroup);
|
||||||
m_MusicWheel.SetOpenSection(sNewGroup);
|
m_MusicWheel.SetOpenSection(sNewGroup);
|
||||||
|
MESSAGEMAN->Broadcast("NextGroup");
|
||||||
AfterMusicChange();
|
AfterMusicChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -723,8 +724,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
m_MusicWheel.ChangeMusicUnlessLocked( +1 );
|
m_MusicWheel.ChangeMusicUnlessLocked( +1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// added an entry for difficulty change with
|
// added an entry for difficulty change with gamebuttons -DaisuMaster
|
||||||
// gamebuttons -DaisuMaster
|
|
||||||
else if( input.MenuI == m_GameButtonPreviousDifficulty )
|
else if( input.MenuI == m_GameButtonPreviousDifficulty )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||||
@@ -747,28 +747,70 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
ChangeSteps( input.pn, +1);
|
ChangeSteps( input.pn, +1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// added also for groupchanges
|
||||||
|
else if(input.MenuI == m_GameButtonPreviousGroup )
|
||||||
|
{
|
||||||
|
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||||
|
m_soundLocked.Play();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RString sNewGroup = m_MusicWheel.JumpToPrevGroup();
|
||||||
|
m_MusicWheel.SelectSection(sNewGroup);
|
||||||
|
m_MusicWheel.SetOpenSection(sNewGroup);
|
||||||
|
MESSAGEMAN->Broadcast("PreviousGroup");
|
||||||
|
AfterMusicChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(input.MenuI == m_GameButtonNextGroup )
|
||||||
|
{
|
||||||
|
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||||
|
m_soundLocked.Play();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RString sNewGroup = m_MusicWheel.JumpToNextGroup();
|
||||||
|
m_MusicWheel.SelectSection(sNewGroup);
|
||||||
|
m_MusicWheel.SetOpenSection(sNewGroup);
|
||||||
|
MESSAGEMAN->Broadcast("NextGroup");
|
||||||
|
AfterMusicChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( m_SelectionState == SelectionState_SelectingSteps &&
|
if( m_SelectionState == SelectionState_SelectingSteps && input.type == IET_FIRST_PRESS && !m_bStepsChosen[input.pn] )
|
||||||
input.type == IET_FIRST_PRESS &&
|
|
||||||
(input.MenuI == m_GameButtonNextSong || input.MenuI == m_GameButtonPreviousSong) &&
|
|
||||||
!m_bStepsChosen[input.pn] )
|
|
||||||
{
|
{
|
||||||
if( input.MenuI == m_GameButtonPreviousSong )
|
if( input.MenuI == m_GameButtonNextSong || input.MenuI == m_GameButtonPreviousSong )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
if( input.MenuI == m_GameButtonPreviousSong )
|
||||||
m_soundLocked.Play();
|
{
|
||||||
else
|
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||||
ChangeSteps( input.pn, -1 );
|
m_soundLocked.Play();
|
||||||
|
else
|
||||||
|
ChangeSteps( input.pn, -1 );
|
||||||
|
}
|
||||||
|
else if( input.MenuI == m_GameButtonNextSong )
|
||||||
|
{
|
||||||
|
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||||
|
m_soundLocked.Play();
|
||||||
|
else
|
||||||
|
ChangeSteps( input.pn, +1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( input.MenuI == m_GameButtonNextSong )
|
else if( input.MenuI == GAME_BUTTON_MENUUP || input.MenuI == GAME_BUTTON_MENUDOWN ) // && TWO_PART_DESELECTS_WITH_MENUUPDOWN
|
||||||
{
|
{
|
||||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||||
m_soundLocked.Play();
|
m_soundLocked.Play();
|
||||||
else
|
else
|
||||||
ChangeSteps( input.pn, +1 );
|
{
|
||||||
|
Message msg("SongUnchosen");
|
||||||
|
msg.SetParam( "Player", input.pn );
|
||||||
|
MESSAGEMAN->Broadcast( msg );
|
||||||
|
//unset all steps
|
||||||
|
FOREACH_ENUM( PlayerNumber , p )
|
||||||
|
m_bStepsChosen[p] = false;
|
||||||
|
m_SelectionState = SelectionState_SelectingSong;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -828,6 +870,7 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input )
|
|||||||
RString sNewGroup = m_MusicWheel.JumpToNextGroup();
|
RString sNewGroup = m_MusicWheel.JumpToNextGroup();
|
||||||
m_MusicWheel.SelectSection(sNewGroup);
|
m_MusicWheel.SelectSection(sNewGroup);
|
||||||
m_MusicWheel.SetOpenSection(sNewGroup);
|
m_MusicWheel.SetOpenSection(sNewGroup);
|
||||||
|
MESSAGEMAN->Broadcast("PreviousGroup");
|
||||||
AfterMusicChange();
|
AfterMusicChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -840,6 +883,7 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input )
|
|||||||
RString sNewGroup = m_MusicWheel.JumpToPrevGroup();
|
RString sNewGroup = m_MusicWheel.JumpToPrevGroup();
|
||||||
m_MusicWheel.SelectSection(sNewGroup);
|
m_MusicWheel.SelectSection(sNewGroup);
|
||||||
m_MusicWheel.SetOpenSection(sNewGroup);
|
m_MusicWheel.SetOpenSection(sNewGroup);
|
||||||
|
MESSAGEMAN->Broadcast("NextGroup");
|
||||||
AfterMusicChange();
|
AfterMusicChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1407,7 +1451,8 @@ void ScreenSelectMusic::MenuBack( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
// Handle unselect song (ffff)
|
// Handle unselect song (ffff)
|
||||||
// todo: this isn't right at all. -aj
|
// todo: this isn't right at all. -aj
|
||||||
if( m_SelectionState == SelectionState_SelectingSteps && !m_bStepsChosen[input.pn] && input.MenuI == GAME_BUTTON_BACK && input.type == IET_FIRST_PRESS )
|
// temporal: deactivating this for the time being -DaisuMaster
|
||||||
|
/*if( m_SelectionState == SelectionState_SelectingSteps && !m_bStepsChosen[input.pn] && input.MenuI == GAME_BUTTON_BACK && input.type == IET_FIRST_PRESS )
|
||||||
{
|
{
|
||||||
// if a player has chosen their steps already, don't unchoose song.
|
// if a player has chosen their steps already, don't unchoose song.
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_HumanPlayer( p )
|
||||||
@@ -1419,7 +1464,7 @@ void ScreenSelectMusic::MenuBack( const InputEventPlus &input )
|
|||||||
MESSAGEMAN->Broadcast( msg );
|
MESSAGEMAN->Broadcast( msg );
|
||||||
m_SelectionState = SelectionState_SelectingSong;
|
m_SelectionState = SelectionState_SelectingSong;
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
m_BackgroundLoader.Abort();
|
m_BackgroundLoader.Abort();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user