1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:52:54 +08:00

Merge branch 'master' into ctb-hyperdash-fix

This commit is contained in:
Dan Balasescu 2019-03-05 12:30:50 +09:00 committed by GitHub
commit 6e7232bcec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 6 deletions

View File

@ -48,11 +48,11 @@ namespace osu.Game.Beatmaps.Drawables
var rating = beatmap.StarDifficulty;
if (rating < 1.5) return DifficultyRating.Easy;
if (rating < 2.25) return DifficultyRating.Normal;
if (rating < 3.75) return DifficultyRating.Hard;
if (rating < 5.25) return DifficultyRating.Insane;
if (rating < 6.75) return DifficultyRating.Expert;
if (rating < 2.0) return DifficultyRating.Easy;
if (rating < 2.7) return DifficultyRating.Normal;
if (rating < 4.0) return DifficultyRating.Hard;
if (rating < 5.3) return DifficultyRating.Insane;
if (rating < 6.5) return DifficultyRating.Expert;
return DifficultyRating.ExpertPlus;
}

View File

@ -5,14 +5,17 @@ using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Screens;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API;
using osuTK;
using osuTK.Graphics;
using osu.Game.Overlays;
using osu.Game.Users;
namespace osu.Game.Screens.Menu
{
@ -33,13 +36,15 @@ namespace osu.Game.Screens.Menu
private const float icon_y = -85;
private readonly Bindable<User> currentUser = new Bindable<User>();
public Disclaimer()
{
ValidForResume = false;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
private void load(OsuColour colours, APIAccess api)
{
InternalChildren = new Drawable[]
{
@ -96,6 +101,13 @@ namespace osu.Game.Screens.Menu
}).First());
iconColour = colours.Yellow;
currentUser.BindTo(api.LocalUser);
currentUser.BindValueChanged(e =>
{
if (e.NewValue.IsSupporter)
supporterDrawables.ForEach(d => d.FadeOut(500, Easing.OutQuint).Expire());
}, true);
}
protected override void LoadComplete()