1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Merge remote-tracking branch 'upstream/master' into tooltips

# Conflicts:
#	osu.Game/Graphics/UserInterface/OsuSliderBar.cs
This commit is contained in:
Dean Herbert 2017-04-20 18:02:38 +09:00
commit 02e406860b
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
2 changed files with 9 additions and 2 deletions

View File

@ -13,10 +13,11 @@ using osu.Framework.Input;
namespace osu.Game.Graphics.UserInterface
{
public class OsuSliderBar<U> : SliderBar<U>, IHasTooltip where U : struct
public class OsuSliderBar<T> : SliderBar<T>, IHasTooltip where T : struct
{
private SampleChannel sample;
private double lastSampleTime;
private T lastSampleValue;
private readonly Nub nub;
private readonly Box leftBox;
@ -105,6 +106,12 @@ namespace osu.Game.Graphics.UserInterface
{
if (Clock == null || Clock.CurrentTime - lastSampleTime <= 50)
return;
if (Current.Value.Equals(lastSampleValue))
return;
lastSampleValue = Current.Value;
lastSampleTime = Clock.CurrentTime;
sample.Frequency.Value = 1 + NormalizedValue * 0.2f;

View File

@ -86,7 +86,7 @@ namespace osu.Game.Online.Chat.Drawables
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Font = @"Exo2.0-SemiBold",
Text = $@"{Message.Timestamp.LocalDateTime:hh:mm:ss}",
Text = $@"{Message.Timestamp.LocalDateTime:HH:mm:ss}",
FixedWidth = true,
TextSize = text_size * 0.75f,
Alpha = 0.4f,