mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08:00
Simplify line move logic in ToolbarRulesetSelector (#5433)
Simplify line move logic in ToolbarRulesetSelector
This commit is contained in:
commit
cf1ec5692a
@ -71,15 +71,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
// Scheduled to allow the flow layout to be computed before the line position is updated
|
// Scheduled to allow the flow layout to be computed before the line position is updated
|
||||||
private void moveLineToCurrent() => ScheduleAfterChildren(() =>
|
private void moveLineToCurrent() => ScheduleAfterChildren(() =>
|
||||||
{
|
{
|
||||||
foreach (var tabItem in TabContainer)
|
ModeButtonLine.MoveToX(SelectedTab.DrawPosition.X, !hasInitialPosition ? 0 : 200, Easing.OutQuint);
|
||||||
{
|
|
||||||
if (tabItem.Value.Equals(Current.Value))
|
|
||||||
{
|
|
||||||
ModeButtonLine.MoveToX(tabItem.DrawPosition.X, !hasInitialPosition ? 0 : 200, Easing.OutQuint);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hasInitialPosition = true;
|
hasInitialPosition = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user