1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Fix PlaybackControl string allocations

This commit is contained in:
Andrei Zavatski 2024-02-20 19:31:28 +03:00
parent e9aca9226a
commit 6678c4783b

View File

@ -97,11 +97,14 @@ namespace osu.Game.Screens.Edit.Components
editorClock.Start();
}
private static readonly IconUsage play_icon = FontAwesome.Regular.PlayCircle;
private static readonly IconUsage pause_icon = FontAwesome.Regular.PauseCircle;
protected override void Update()
{
base.Update();
playButton.Icon = editorClock.IsRunning ? FontAwesome.Regular.PauseCircle : FontAwesome.Regular.PlayCircle;
playButton.Icon = editorClock.IsRunning ? pause_icon : play_icon;
}
private partial class PlaybackTabControl : OsuTabControl<double>