mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Add function to reset break index
This commit is contained in:
@ -33,7 +33,7 @@ namespace osu.Game.Screens.Play
|
||||
breaks = value;
|
||||
|
||||
// reset index in case the new breaks list is smaller than last one
|
||||
currentBreakIndex = 0;
|
||||
resetBreakIndex();
|
||||
|
||||
initializeBreaks();
|
||||
}
|
||||
@ -130,12 +130,17 @@ namespace osu.Game.Screens.Play
|
||||
updateBreakTimeBindable();
|
||||
}
|
||||
|
||||
private void resetBreakIndex()
|
||||
{
|
||||
isBreakTime.Value = false;
|
||||
currentBreakIndex = 0;
|
||||
}
|
||||
|
||||
private void updateBreakTimeBindable()
|
||||
{
|
||||
if (breaks?.Any() != true)
|
||||
{
|
||||
isBreakTime.Value = false;
|
||||
currentBreakIndex = 0;
|
||||
resetBreakIndex();
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user