mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 00:53:19 +08:00
commit
ecb840e26f
@ -25,7 +25,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
|||||||
{
|
{
|
||||||
BlendingMode = BlendingMode.Additive,
|
BlendingMode = BlendingMode.Additive,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Alpha = 0.1f,
|
Alpha = 0.2f,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -15,17 +15,19 @@ namespace osu.Game.Modes.Osu.UI
|
|||||||
{
|
{
|
||||||
protected override ScoreCounter CreateScoreCounter() => new ScoreCounter()
|
protected override ScoreCounter CreateScoreCounter() => new ScoreCounter()
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopCentre,
|
||||||
TextSize = 60,
|
TextSize = 40,
|
||||||
|
Position = new Vector2(0, 30),
|
||||||
Margin = new MarginPadding { Right = 5 },
|
Margin = new MarginPadding { Right = 5 },
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override PercentageCounter CreateAccuracyCounter() => new PercentageCounter()
|
protected override PercentageCounter CreateAccuracyCounter() => new PercentageCounter()
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopCentre,
|
||||||
Position = new Vector2(0, 55),
|
Position = new Vector2(0, 65),
|
||||||
|
TextSize = 20,
|
||||||
Margin = new MarginPadding { Right = 5 },
|
Margin = new MarginPadding { Right = 5 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -107,7 +107,10 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
DisplayedCountSpriteText = new OsuSpriteText(),
|
DisplayedCountSpriteText = new OsuSpriteText()
|
||||||
|
{
|
||||||
|
Font = @"Venera"
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
TextSize = 40;
|
TextSize = 40;
|
||||||
|
@ -1,23 +1,29 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
||||||
|
|
||||||
using OpenTK;
|
using System;
|
||||||
using OpenTK.Graphics;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
using System;
|
using osu.Game.Graphics;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Modes.UI
|
namespace osu.Game.Modes.UI
|
||||||
{
|
{
|
||||||
public class HealthDisplay : Container
|
public class HealthDisplay : Container
|
||||||
{
|
{
|
||||||
private Box background;
|
private Box background;
|
||||||
private Box fill;
|
private Container fill;
|
||||||
|
|
||||||
public BindableDouble Current = new BindableDouble() { MinValue = 0, MaxValue = 1 };
|
public BindableDouble Current = new BindableDouble()
|
||||||
|
{
|
||||||
|
MinValue = 0,
|
||||||
|
MaxValue = 1
|
||||||
|
};
|
||||||
|
|
||||||
public HealthDisplay()
|
public HealthDisplay()
|
||||||
{
|
{
|
||||||
@ -26,19 +32,38 @@ namespace osu.Game.Modes.UI
|
|||||||
background = new Box
|
background = new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Color4.Gray,
|
Colour = Color4.Black,
|
||||||
},
|
},
|
||||||
fill = new Box
|
fill = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Color4.White,
|
|
||||||
Scale = new Vector2(0, 1),
|
Scale = new Vector2(0, 1),
|
||||||
},
|
Masking = true,
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
Current.ValueChanged += current_ValueChanged;
|
Current.ValueChanged += current_ValueChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void laod(OsuColour colours)
|
||||||
|
{
|
||||||
|
fill.Colour = colours.BlueLighter;
|
||||||
|
fill.EdgeEffect = new EdgeEffect
|
||||||
|
{
|
||||||
|
Colour = colours.BlueDarker.Opacity(0.6f),
|
||||||
|
Radius = 8,
|
||||||
|
Type= EdgeEffectType.Glow
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private void current_ValueChanged(object sender, EventArgs e)
|
private void current_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
fill.ScaleTo(new Vector2((float)Current, 1), 200, EasingTypes.OutQuint);
|
fill.ScaleTo(new Vector2((float)Current, 1), 200, EasingTypes.OutQuint);
|
||||||
|
@ -27,9 +27,9 @@ namespace osu.Game.Modes.UI
|
|||||||
protected abstract ScoreCounter CreateScoreCounter();
|
protected abstract ScoreCounter CreateScoreCounter();
|
||||||
protected virtual HealthDisplay CreateHealthDisplay() => new HealthDisplay
|
protected virtual HealthDisplay CreateHealthDisplay() => new HealthDisplay
|
||||||
{
|
{
|
||||||
Size = new Vector2(0.5f, 20),
|
Size = new Vector2(1, 5),
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Padding = new MarginPadding(5)
|
Margin = new MarginPadding { Top = 20 }
|
||||||
};
|
};
|
||||||
|
|
||||||
public virtual void OnHit(HitObject h)
|
public virtual void OnHit(HitObject h)
|
||||||
|
@ -195,11 +195,12 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||||
{
|
{
|
||||||
|
|
||||||
logoBounceContainer.ScaleTo(1f, 500, EasingTypes.OutElastic);
|
logoBounceContainer.ScaleTo(1f, 500, EasingTypes.OutElastic);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnDragStart(InputState state) => true;
|
||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
protected override bool OnClick(InputState state)
|
||||||
{
|
{
|
||||||
if (!Interactive) return false;
|
if (!Interactive) return false;
|
||||||
|
@ -89,6 +89,8 @@ namespace osu.Game.Screens.Play
|
|||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = Name,
|
Text = Name,
|
||||||
|
Font = @"Venera",
|
||||||
|
TextSize = 12,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativePositionAxes = Axes.Both,
|
RelativePositionAxes = Axes.Both,
|
||||||
|
@ -25,6 +25,8 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private const float padding = 80;
|
private const float padding = 80;
|
||||||
|
|
||||||
|
public override bool Contains(Vector2 screenSpacePos) => true;
|
||||||
|
|
||||||
public Action OnBack;
|
public Action OnBack;
|
||||||
public Action OnStart;
|
public Action OnStart;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user