1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-29 03:43:00 +08:00

calculation is now a 'one-liner'

This commit is contained in:
Jorolf 2017-02-13 16:56:15 +01:00
parent 1978984006
commit c1ba53fa09

View File

@ -31,8 +31,7 @@ namespace osu.Game.Overlays.Toolbar
{
RelativeSizeAxes = Axes.Y;
float length = Enum.GetValues(typeof(PlayMode)).Length * ToolbarButton.WIDTH + padding*2;
float lineLength = (padding * 2 + ToolbarButton.WIDTH) / length;
float lineLength = (padding * 2 + ToolbarButton.WIDTH) / (Enum.GetValues(typeof(PlayMode)).Length * ToolbarButton.WIDTH + padding * 2);
Children = new Drawable[]