mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Merge branch 'master' into header-button-should-derive
This commit is contained in:
Submodule osu-framework updated: fe49ccb3c8...d92cec7645
Submodule osu-resources updated: 1750ab8f67...4287ee8043
@ -13,7 +13,7 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/maste
|
|||||||
<add key="ProjectName" value="osu.Desktop" />
|
<add key="ProjectName" value="osu.Desktop" />
|
||||||
<add key="NuSpecName" value="osu.Desktop\osu.nuspec" />
|
<add key="NuSpecName" value="osu.Desktop\osu.nuspec" />
|
||||||
<add key="SolutionName" value="osu" />
|
<add key="SolutionName" value="osu" />
|
||||||
<add key="TargetName" value="Client\osu.Desktop" />
|
<add key="TargetName" value="osu.Desktop" />
|
||||||
<add key="PackageName" value="osulazer" />
|
<add key="PackageName" value="osulazer" />
|
||||||
<add key="IconName" value="lazer.ico" />
|
<add key="IconName" value="lazer.ico" />
|
||||||
<add key="CodeSigningCertificate" value="" />
|
<add key="CodeSigningCertificate" value="" />
|
||||||
|
@ -145,6 +145,8 @@ namespace osu.Desktop.Deploy
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private static void checkReleaseFiles()
|
private static void checkReleaseFiles()
|
||||||
{
|
{
|
||||||
|
if (!canGitHub) return;
|
||||||
|
|
||||||
var releaseLines = getReleaseLines();
|
var releaseLines = getReleaseLines();
|
||||||
|
|
||||||
//ensure we have all files necessary
|
//ensure we have all files necessary
|
||||||
@ -157,6 +159,8 @@ namespace osu.Desktop.Deploy
|
|||||||
|
|
||||||
private static void pruneReleases()
|
private static void pruneReleases()
|
||||||
{
|
{
|
||||||
|
if (!canGitHub) return;
|
||||||
|
|
||||||
write("Pruning RELEASES...");
|
write("Pruning RELEASES...");
|
||||||
|
|
||||||
var releaseLines = getReleaseLines().ToList();
|
var releaseLines = getReleaseLines().ToList();
|
||||||
@ -190,7 +194,7 @@ namespace osu.Desktop.Deploy
|
|||||||
|
|
||||||
private static void uploadBuild(string version)
|
private static void uploadBuild(string version)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(GitHubAccessToken) || string.IsNullOrEmpty(codeSigningCertPath))
|
if (!canGitHub || string.IsNullOrEmpty(CodeSigningCertificate))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
write("Publishing to GitHub...");
|
write("Publishing to GitHub...");
|
||||||
@ -228,8 +232,12 @@ namespace osu.Desktop.Deploy
|
|||||||
|
|
||||||
private static void openGitHubReleasePage() => Process.Start(GitHubReleasePage);
|
private static void openGitHubReleasePage() => Process.Start(GitHubReleasePage);
|
||||||
|
|
||||||
|
private static bool canGitHub => !string.IsNullOrEmpty(GitHubAccessToken);
|
||||||
|
|
||||||
private static void checkGitHubReleases()
|
private static void checkGitHubReleases()
|
||||||
{
|
{
|
||||||
|
if (!canGitHub) return;
|
||||||
|
|
||||||
write("Checking GitHub releases...");
|
write("Checking GitHub releases...");
|
||||||
var req = new JsonWebRequest<List<GitHubRelease>>($"{GitHubApiEndpoint}");
|
var req = new JsonWebRequest<List<GitHubRelease>>($"{GitHubApiEndpoint}");
|
||||||
req.AuthenticatedBlockingPerform();
|
req.AuthenticatedBlockingPerform();
|
||||||
|
@ -138,8 +138,8 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
|||||||
Pattern newPattern = conversion.Generate();
|
Pattern newPattern = conversion.Generate();
|
||||||
lastPattern = newPattern;
|
lastPattern = newPattern;
|
||||||
|
|
||||||
var stairPatternGenerator = (HitObjectPatternGenerator)conversion;
|
var stairPatternGenerator = conversion as HitObjectPatternGenerator;
|
||||||
lastStair = stairPatternGenerator.StairType;
|
lastStair = stairPatternGenerator?.StairType ?? lastStair;
|
||||||
|
|
||||||
return newPattern.HitObjects;
|
return newPattern.HitObjects;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
Add(container = new ExampleContainer());
|
Add(container = new ExampleContainer());
|
||||||
|
|
||||||
AddStep(@"Add button", () => container.Add(new OsuButton
|
AddStep(@"Add button", () => container.Add(new TriangleButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = @"Button",
|
Text = @"Button",
|
||||||
|
@ -3,12 +3,18 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Audio.Sample;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
|
using osu.Framework.MathUtils;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Drawables
|
namespace osu.Game.Beatmaps.Drawables
|
||||||
{
|
{
|
||||||
@ -22,6 +28,10 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
private readonly Container nestedContainer;
|
private readonly Container nestedContainer;
|
||||||
|
|
||||||
|
private readonly Container borderContainer;
|
||||||
|
|
||||||
|
private readonly Box hoverLayer;
|
||||||
|
|
||||||
protected override Container<Drawable> Content => nestedContainer;
|
protected override Container<Drawable> Content => nestedContainer;
|
||||||
|
|
||||||
protected Panel()
|
protected Panel()
|
||||||
@ -29,20 +39,56 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
Height = MAX_HEIGHT;
|
Height = MAX_HEIGHT;
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
|
||||||
AddInternal(nestedContainer = new Container
|
AddInternal(borderContainer = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
CornerRadius = 10,
|
CornerRadius = 10,
|
||||||
BorderColour = new Color4(221, 255, 255, 255),
|
BorderColour = new Color4(221, 255, 255, 255),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
nestedContainer = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
},
|
||||||
|
hoverLayer = new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Alpha = 0,
|
||||||
|
Blending = BlendingMode.Additive,
|
||||||
|
},
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Alpha = 0;
|
Alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private SampleChannel sampleHover;
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(AudioManager audio, OsuColour colours)
|
||||||
|
{
|
||||||
|
sampleHover = audio.Sample.Get($@"SongSelect/song-ping-variation-{RNG.Next(1, 5)}");
|
||||||
|
hoverLayer.Colour = colours.Blue.Opacity(0.1f);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnHover(InputState state)
|
||||||
|
{
|
||||||
|
sampleHover?.Play();
|
||||||
|
|
||||||
|
hoverLayer.FadeIn(100, Easing.OutQuint);
|
||||||
|
return base.OnHover(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnHoverLost(InputState state)
|
||||||
|
{
|
||||||
|
hoverLayer.FadeOut(1000, Easing.OutQuint);
|
||||||
|
base.OnHoverLost(state);
|
||||||
|
}
|
||||||
|
|
||||||
public void SetMultiplicativeAlpha(float alpha)
|
public void SetMultiplicativeAlpha(float alpha)
|
||||||
{
|
{
|
||||||
nestedContainer.Alpha = alpha;
|
borderContainer.Alpha = alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -94,8 +140,8 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
protected virtual void Selected()
|
protected virtual void Selected()
|
||||||
{
|
{
|
||||||
nestedContainer.BorderThickness = 2.5f;
|
borderContainer.BorderThickness = 2.5f;
|
||||||
nestedContainer.EdgeEffect = new EdgeEffectParameters
|
borderContainer.EdgeEffect = new EdgeEffectParameters
|
||||||
{
|
{
|
||||||
Type = EdgeEffectType.Glow,
|
Type = EdgeEffectType.Glow,
|
||||||
Colour = new Color4(130, 204, 255, 150),
|
Colour = new Color4(130, 204, 255, 150),
|
||||||
@ -106,8 +152,8 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
protected virtual void Deselected()
|
protected virtual void Deselected()
|
||||||
{
|
{
|
||||||
nestedContainer.BorderThickness = 0;
|
borderContainer.BorderThickness = 0;
|
||||||
nestedContainer.EdgeEffect = new EdgeEffectParameters
|
borderContainer.EdgeEffect = new EdgeEffectParameters
|
||||||
{
|
{
|
||||||
Type = EdgeEffectType.Shadow,
|
Type = EdgeEffectType.Shadow,
|
||||||
Offset = new Vector2(1),
|
Offset = new Vector2(1),
|
||||||
|
@ -16,6 +16,7 @@ namespace osu.Game.Configuration
|
|||||||
Set(OsuSetting.Ruleset, 0, 0, int.MaxValue);
|
Set(OsuSetting.Ruleset, 0, 0, int.MaxValue);
|
||||||
Set(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Details);
|
Set(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Details);
|
||||||
|
|
||||||
|
Set(OsuSetting.ShowConvertedBeatmaps, true);
|
||||||
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
|
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
|
||||||
Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10, 0.1);
|
Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10, 0.1);
|
||||||
|
|
||||||
@ -112,6 +113,7 @@ namespace osu.Game.Configuration
|
|||||||
SnakingOutSliders,
|
SnakingOutSliders,
|
||||||
ShowFpsDisplay,
|
ShowFpsDisplay,
|
||||||
ChatDisplayHeight,
|
ChatDisplayHeight,
|
||||||
Version
|
Version,
|
||||||
|
ShowConvertedBeatmaps
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,34 +2,39 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Audio.Sample;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Containers
|
namespace osu.Game.Graphics.Containers
|
||||||
{
|
{
|
||||||
public class OsuClickableContainer : ClickableContainer
|
public class OsuClickableContainer : ClickableContainer
|
||||||
{
|
{
|
||||||
protected SampleChannel SampleClick, SampleHover;
|
private readonly HoverSampleSet sampleSet;
|
||||||
|
|
||||||
|
private readonly Container content = new Container { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
|
public OsuClickableContainer(HoverSampleSet sampleSet = HoverSampleSet.Normal)
|
||||||
|
{
|
||||||
|
this.sampleSet = sampleSet;
|
||||||
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio)
|
private void load()
|
||||||
{
|
{
|
||||||
SampleHover = audio.Sample.Get(@"UI/generic-hover");
|
if (AutoSizeAxes != Axes.None)
|
||||||
SampleClick = audio.Sample.Get(@"UI/generic-click");
|
{
|
||||||
|
content.RelativeSizeAxes = RelativeSizeAxes;
|
||||||
|
content.AutoSizeAxes = AutoSizeAxes;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
SampleHover?.Play();
|
content,
|
||||||
return base.OnHover(state);
|
new HoverClickSounds(sampleSet)
|
||||||
}
|
};
|
||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
|
||||||
{
|
|
||||||
SampleClick?.Play();
|
|
||||||
return base.OnClick(state);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
samplePopIn = audio.Sample.Get(@"UI/melodic-5");
|
samplePopIn = audio.Sample.Get(@"UI/overlay-pop-in");
|
||||||
samplePopOut = audio.Sample.Get(@"UI/melodic-4");
|
samplePopOut = audio.Sample.Get(@"UI/overlay-pop-out");
|
||||||
|
|
||||||
StateChanged += onStateChanged;
|
StateChanged += onStateChanged;
|
||||||
}
|
}
|
||||||
|
@ -57,19 +57,31 @@ namespace osu.Game.Graphics
|
|||||||
private void load(FontStore store)
|
private void load(FontStore store)
|
||||||
{
|
{
|
||||||
this.store = store;
|
this.store = store;
|
||||||
|
|
||||||
updateTexture();
|
updateTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
updateTexture();
|
||||||
|
}
|
||||||
|
|
||||||
|
private FontAwesome loadedIcon;
|
||||||
private void updateTexture()
|
private void updateTexture()
|
||||||
{
|
{
|
||||||
var texture = store?.Get(((char)icon).ToString());
|
var loadableIcon = icon;
|
||||||
|
|
||||||
|
if (loadableIcon == loadedIcon) return;
|
||||||
|
|
||||||
|
var texture = store?.Get(((char)loadableIcon).ToString());
|
||||||
|
|
||||||
spriteMain.Texture = texture;
|
spriteMain.Texture = texture;
|
||||||
spriteShadow.Texture = texture;
|
spriteShadow.Texture = texture;
|
||||||
|
|
||||||
if (Size == Vector2.Zero)
|
if (Size == Vector2.Zero)
|
||||||
Size = new Vector2(texture?.DisplayWidth ?? 0, texture?.DisplayHeight ?? 0);
|
Size = new Vector2(texture?.DisplayWidth ?? 0, texture?.DisplayHeight ?? 0);
|
||||||
|
|
||||||
|
loadedIcon = loadableIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
|
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
|
||||||
|
36
osu.Game/Graphics/UserInterface/HoverClickSounds.cs
Normal file
36
osu.Game/Graphics/UserInterface/HoverClickSounds.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Audio.Sample;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.UserInterface
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Adds hover and click sounds to a drawable.
|
||||||
|
/// Does not draw anything.
|
||||||
|
/// </summary>
|
||||||
|
public class HoverClickSounds : HoverSounds
|
||||||
|
{
|
||||||
|
private SampleChannel sampleClick;
|
||||||
|
|
||||||
|
public HoverClickSounds(HoverSampleSet sampleSet = HoverSampleSet.Normal) : base(sampleSet)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnClick(InputState state)
|
||||||
|
{
|
||||||
|
sampleClick?.Play();
|
||||||
|
return base.OnClick(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(AudioManager audio)
|
||||||
|
{
|
||||||
|
sampleClick = audio.Sample.Get($@"UI/generic-select{SampleSet.GetDescription()}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
53
osu.Game/Graphics/UserInterface/HoverSounds.cs
Normal file
53
osu.Game/Graphics/UserInterface/HoverSounds.cs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.ComponentModel;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Audio.Sample;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.UserInterface
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Adds hover sounds to a drawable.
|
||||||
|
/// Does not draw anything.
|
||||||
|
/// </summary>
|
||||||
|
public class HoverSounds : CompositeDrawable
|
||||||
|
{
|
||||||
|
private SampleChannel sampleHover;
|
||||||
|
|
||||||
|
protected readonly HoverSampleSet SampleSet;
|
||||||
|
|
||||||
|
public HoverSounds(HoverSampleSet sampleSet = HoverSampleSet.Normal)
|
||||||
|
{
|
||||||
|
SampleSet = sampleSet;
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnHover(InputState state)
|
||||||
|
{
|
||||||
|
sampleHover?.Play();
|
||||||
|
return base.OnHover(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(AudioManager audio)
|
||||||
|
{
|
||||||
|
sampleHover = audio.Sample.Get($@"UI/generic-hover{SampleSet.GetDescription()}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum HoverSampleSet
|
||||||
|
{
|
||||||
|
[Description("")]
|
||||||
|
Loud,
|
||||||
|
[Description("-soft")]
|
||||||
|
Normal,
|
||||||
|
[Description("-softer")]
|
||||||
|
Soft
|
||||||
|
}
|
||||||
|
}
|
@ -1,126 +1,18 @@
|
|||||||
// 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/master/LICENCE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using OpenTK.Graphics;
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Audio;
|
|
||||||
using osu.Framework.Audio.Sample;
|
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Shapes;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Input;
|
|
||||||
using osu.Game.Graphics.Backgrounds;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
public class OsuButton : Button, IFilterable
|
/// <summary>
|
||||||
|
/// A button with added default sound effects.
|
||||||
|
/// </summary>
|
||||||
|
public class OsuButton : Button
|
||||||
{
|
{
|
||||||
private Box hover;
|
|
||||||
|
|
||||||
private SampleChannel sampleClick;
|
|
||||||
private SampleChannel sampleHover;
|
|
||||||
|
|
||||||
protected Triangles Triangles;
|
|
||||||
|
|
||||||
public OsuButton()
|
public OsuButton()
|
||||||
{
|
{
|
||||||
Height = 40;
|
Add(new HoverClickSounds(HoverSampleSet.Loud));
|
||||||
}
|
|
||||||
|
|
||||||
protected override SpriteText CreateText() => new OsuSpriteText
|
|
||||||
{
|
|
||||||
Depth = -1,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Font = @"Exo2.0-Bold",
|
|
||||||
};
|
|
||||||
|
|
||||||
public override bool HandleInput => Action != null;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(OsuColour colours, AudioManager audio)
|
|
||||||
{
|
|
||||||
if (Action == null)
|
|
||||||
Colour = OsuColour.Gray(0.5f);
|
|
||||||
|
|
||||||
BackgroundColour = colours.BlueDark;
|
|
||||||
|
|
||||||
Content.Masking = true;
|
|
||||||
Content.CornerRadius = 5;
|
|
||||||
|
|
||||||
AddRange(new Drawable[]
|
|
||||||
{
|
|
||||||
Triangles = new Triangles
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
ColourDark = colours.BlueDarker,
|
|
||||||
ColourLight = colours.Blue,
|
|
||||||
},
|
|
||||||
hover = new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Blending = BlendingMode.Additive,
|
|
||||||
Colour = Color4.White.Opacity(0.1f),
|
|
||||||
Alpha = 0,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
sampleClick = audio.Sample.Get(@"UI/generic-click");
|
|
||||||
sampleHover = audio.Sample.Get(@"UI/generic-hover");
|
|
||||||
|
|
||||||
Enabled.ValueChanged += enabled_ValueChanged;
|
|
||||||
Enabled.TriggerChange();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void enabled_ValueChanged(bool enabled)
|
|
||||||
{
|
|
||||||
this.FadeColour(enabled ? Color4.White : Color4.Gray, 200, Easing.OutQuint);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
|
||||||
{
|
|
||||||
sampleClick?.Play();
|
|
||||||
return base.OnClick(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
|
||||||
{
|
|
||||||
sampleHover?.Play();
|
|
||||||
hover.FadeIn(200);
|
|
||||||
return base.OnHover(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
|
||||||
{
|
|
||||||
hover.FadeOut(200);
|
|
||||||
base.OnHoverLost(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
|
||||||
{
|
|
||||||
Content.ScaleTo(0.9f, 4000, Easing.OutQuint);
|
|
||||||
return base.OnMouseDown(state, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
|
||||||
{
|
|
||||||
Content.ScaleTo(1, 1000, Easing.OutElastic);
|
|
||||||
return base.OnMouseUp(state, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<string> FilterTerms => new[] { Text };
|
|
||||||
|
|
||||||
public bool MatchingFilter
|
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
this.FadeTo(value ? 1 : 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Margin = new MarginPadding { Right = 5 },
|
Margin = new MarginPadding { Right = 5 },
|
||||||
}
|
},
|
||||||
|
new HoverClickSounds()
|
||||||
};
|
};
|
||||||
|
|
||||||
Nub.Current.BindTo(Current);
|
Nub.Current.BindTo(Current);
|
||||||
|
@ -33,7 +33,6 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
if (accentColour == default(Color4))
|
if (accentColour == default(Color4))
|
||||||
accentColour = colours.PinkDarker;
|
accentColour = colours.PinkDarker;
|
||||||
updateAccentColour();
|
updateAccentColour();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateAccentColour()
|
private void updateAccentColour()
|
||||||
@ -137,6 +136,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
nonAccentHoverColour = colours.PinkDarker;
|
nonAccentHoverColour = colours.PinkDarker;
|
||||||
nonAccentSelectedColour = Color4.Black.Opacity(0.5f);
|
nonAccentSelectedColour = Color4.Black.Opacity(0.5f);
|
||||||
updateColours();
|
updateColours();
|
||||||
|
|
||||||
|
AddInternal(new HoverClickSounds(HoverSampleSet.Soft));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateForegroundColour()
|
protected override void UpdateForegroundColour()
|
||||||
@ -183,7 +184,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -237,8 +238,10 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Margin = new MarginPadding { Right = 4 },
|
Margin = new MarginPadding { Right = 4 },
|
||||||
Size = new Vector2(20),
|
Size = new Vector2(20),
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
AddInternal(new HoverClickSounds());
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -72,7 +72,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
sampleHover = audio.Sample.Get(@"UI/generic-hover");
|
sampleHover = audio.Sample.Get(@"UI/generic-hover");
|
||||||
sampleClick = audio.Sample.Get(@"UI/generic-click");
|
sampleClick = audio.Sample.Get(@"UI/generic-select");
|
||||||
|
|
||||||
BackgroundColour = Color4.Transparent;
|
BackgroundColour = Color4.Transparent;
|
||||||
BackgroundColourHover = OsuColour.FromHex(@"172023");
|
BackgroundColourHover = OsuColour.FromHex(@"172023");
|
||||||
|
@ -88,7 +88,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Expanded = true,
|
Expanded = true,
|
||||||
}
|
},
|
||||||
|
new HoverClickSounds()
|
||||||
};
|
};
|
||||||
|
|
||||||
Current.DisabledChanged += disabled =>
|
Current.DisabledChanged += disabled =>
|
||||||
|
@ -131,7 +131,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Colour = Color4.White,
|
Colour = Color4.White,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
}
|
},
|
||||||
|
new HoverClickSounds()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
},
|
},
|
||||||
|
new HoverClickSounds()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
108
osu.Game/Graphics/UserInterface/TriangleButton.cs
Normal file
108
osu.Game/Graphics/UserInterface/TriangleButton.cs
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
using osu.Game.Graphics.Backgrounds;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.UserInterface
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A button with moving triangles in the background.
|
||||||
|
/// </summary>
|
||||||
|
public class TriangleButton : OsuButton, IFilterable
|
||||||
|
{
|
||||||
|
private Box hover;
|
||||||
|
|
||||||
|
protected Triangles Triangles;
|
||||||
|
|
||||||
|
public TriangleButton()
|
||||||
|
{
|
||||||
|
Height = 40;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override SpriteText CreateText() => new OsuSpriteText
|
||||||
|
{
|
||||||
|
Depth = -1,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Font = @"Exo2.0-Bold",
|
||||||
|
};
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
BackgroundColour = colours.BlueDark;
|
||||||
|
|
||||||
|
Content.Masking = true;
|
||||||
|
Content.CornerRadius = 5;
|
||||||
|
|
||||||
|
AddRange(new Drawable[]
|
||||||
|
{
|
||||||
|
Triangles = new Triangles
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
ColourDark = colours.BlueDarker,
|
||||||
|
ColourLight = colours.Blue,
|
||||||
|
},
|
||||||
|
hover = new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Blending = BlendingMode.Additive,
|
||||||
|
Colour = Color4.White.Opacity(0.1f),
|
||||||
|
Alpha = 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
Enabled.ValueChanged += enabled_ValueChanged;
|
||||||
|
Enabled.TriggerChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void enabled_ValueChanged(bool enabled)
|
||||||
|
{
|
||||||
|
this.FadeColour(enabled ? Color4.White : Color4.Gray, 200, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnHover(InputState state)
|
||||||
|
{
|
||||||
|
hover.FadeIn(200);
|
||||||
|
return base.OnHover(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnHoverLost(InputState state)
|
||||||
|
{
|
||||||
|
hover.FadeOut(200);
|
||||||
|
base.OnHoverLost(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
|
{
|
||||||
|
Content.ScaleTo(0.9f, 4000, Easing.OutQuint);
|
||||||
|
return base.OnMouseDown(state, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||||
|
{
|
||||||
|
Content.ScaleTo(1, 1000, Easing.OutElastic);
|
||||||
|
return base.OnMouseUp(state, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<string> FilterTerms => new[] { Text };
|
||||||
|
|
||||||
|
public bool MatchingFilter
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.FadeTo(value ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Development;
|
using osu.Framework.Development;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -137,6 +138,10 @@ namespace osu.Game
|
|||||||
Beatmap = new NonNullableBindable<WorkingBeatmap>(defaultBeatmap);
|
Beatmap = new NonNullableBindable<WorkingBeatmap>(defaultBeatmap);
|
||||||
BeatmapManager.DefaultBeatmap = defaultBeatmap;
|
BeatmapManager.DefaultBeatmap = defaultBeatmap;
|
||||||
|
|
||||||
|
// tracks play so loud our samples can't keep up.
|
||||||
|
// this adds a global reduction of track volume for the time being.
|
||||||
|
Audio.Track.AddAdjustment(AdjustableProperty.Volume, new BindableDouble(0.8));
|
||||||
|
|
||||||
Beatmap.ValueChanged += b =>
|
Beatmap.ValueChanged += b =>
|
||||||
{
|
{
|
||||||
var trackLoaded = lastBeatmap?.TrackLoaded ?? false;
|
var trackLoaded = lastBeatmap?.TrackLoaded ?? false;
|
||||||
|
@ -234,7 +234,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
|
|
||||||
private void handleBeatmapAdd(BeatmapSetInfo beatmap)
|
private void handleBeatmapAdd(BeatmapSetInfo beatmap)
|
||||||
{
|
{
|
||||||
if (beatmap.OnlineBeatmapSetID == BeatmapSet.OnlineBeatmapSetID)
|
if (beatmap.OnlineBeatmapSetID == BeatmapSet?.OnlineBeatmapSetID)
|
||||||
downloadButtonsContainer.FadeOut(transition_duration);
|
downloadButtonsContainer.FadeOut(transition_duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class MessageSender : ClickableContainer, IHasContextMenu
|
private class MessageSender : OsuClickableContainer, IHasContextMenu
|
||||||
{
|
{
|
||||||
private readonly User sender;
|
private readonly User sender;
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ using OpenTK;
|
|||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Chat
|
namespace osu.Game.Overlays.Chat
|
||||||
{
|
{
|
||||||
@ -259,7 +260,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CloseButton : ClickableContainer
|
public class CloseButton : OsuClickableContainer
|
||||||
{
|
{
|
||||||
private readonly SpriteIcon icon;
|
private readonly SpriteIcon icon;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
if (beatmapSets?.Equals(value) ?? false) return;
|
if (beatmapSets?.Equals(value) ?? false) return;
|
||||||
|
|
||||||
beatmapSets = value;
|
beatmapSets = value?.ToList();
|
||||||
|
|
||||||
if (beatmapSets == null) return;
|
if (beatmapSets == null) return;
|
||||||
|
|
||||||
@ -65,8 +65,6 @@ namespace osu.Game.Overlays
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResultAmounts = new ResultCounts(distinctCount(artists), distinctCount(songs), distinctCount(tags));
|
ResultAmounts = new ResultCounts(distinctCount(artists), distinctCount(songs), distinctCount(tags));
|
||||||
|
|
||||||
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -282,7 +280,11 @@ namespace osu.Game.Overlays
|
|||||||
var sets = response.Select(r => r.ToBeatmapSet(rulesets)).Where(b => !presentOnlineIds.Contains(b.OnlineBeatmapSetID)).ToList();
|
var sets = response.Select(r => r.ToBeatmapSet(rulesets)).Where(b => !presentOnlineIds.Contains(b.OnlineBeatmapSetID)).ToList();
|
||||||
|
|
||||||
// may not need scheduling; loads async internally.
|
// may not need scheduling; loads async internally.
|
||||||
Schedule(() => BeatmapSets = sets);
|
Schedule(() =>
|
||||||
|
{
|
||||||
|
BeatmapSets = sets;
|
||||||
|
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ResetButton : OsuButton
|
public class ResetButton : TriangleButton
|
||||||
{
|
{
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
|
@ -17,6 +17,7 @@ using osu.Game.Rulesets.UI;
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Mods
|
namespace osu.Game.Overlays.Mods
|
||||||
{
|
{
|
||||||
@ -148,7 +149,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
// the mods from Mod, only multiple if Mod is a MultiMod
|
// the mods from Mod, only multiple if Mod is a MultiMod
|
||||||
|
|
||||||
public override Mod SelectedMod => Mods.ElementAtOrDefault(SelectedIndex);
|
public virtual Mod SelectedMod => Mods.ElementAtOrDefault(SelectedIndex);
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
@ -253,6 +254,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
TextSize = 18,
|
TextSize = 18,
|
||||||
},
|
},
|
||||||
|
new HoverClickSounds()
|
||||||
};
|
};
|
||||||
|
|
||||||
Mod = mod;
|
Mod = mod;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Rulesets.Mods;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Mods
|
namespace osu.Game.Overlays.Mods
|
||||||
{
|
{
|
||||||
@ -12,8 +11,6 @@ namespace osu.Game.Overlays.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class ModButtonEmpty : Container
|
public class ModButtonEmpty : Container
|
||||||
{
|
{
|
||||||
public virtual Mod SelectedMod => null;
|
|
||||||
|
|
||||||
public ModButtonEmpty()
|
public ModButtonEmpty()
|
||||||
{
|
{
|
||||||
Size = new Vector2(100f);
|
Size = new Vector2(100f);
|
||||||
|
@ -17,6 +17,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
new SettingsCheckbox
|
||||||
|
{
|
||||||
|
LabelText = "Show converted beatmaps",
|
||||||
|
Bindable = config.GetBindable<bool>(OsuSetting.ShowConvertedBeatmaps),
|
||||||
|
},
|
||||||
new SettingsSlider<double, StarSlider>
|
new SettingsSlider<double, StarSlider>
|
||||||
{
|
{
|
||||||
LabelText = "Display beatmaps from",
|
LabelText = "Display beatmaps from",
|
||||||
@ -33,7 +38,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
{
|
{
|
||||||
LabelText = "Random beatmap selection",
|
LabelText = "Random beatmap selection",
|
||||||
Bindable = config.GetBindable<SelectionRandomType>(OsuSetting.SelectionRandomType),
|
Bindable = config.GetBindable<SelectionRandomType>(OsuSetting.SelectionRandomType),
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
public class GeneralSettings : SettingsSubsection
|
public class GeneralSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
private OsuButton importButton;
|
private TriangleButton importButton;
|
||||||
private OsuButton deleteButton;
|
private TriangleButton deleteButton;
|
||||||
private OsuButton restoreButton;
|
private TriangleButton restoreButton;
|
||||||
|
|
||||||
protected override string Header => "General";
|
protected override string Header => "General";
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Settings
|
namespace osu.Game.Overlays.Settings
|
||||||
{
|
{
|
||||||
public class SettingsButton : OsuButton
|
public class SettingsButton : TriangleButton
|
||||||
{
|
{
|
||||||
public SettingsButton()
|
public SettingsButton()
|
||||||
{
|
{
|
||||||
|
@ -12,14 +12,14 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings
|
namespace osu.Game.Overlays.Settings
|
||||||
{
|
{
|
||||||
public class SidebarButton : Container
|
public class SidebarButton : OsuButton
|
||||||
{
|
{
|
||||||
private readonly SpriteIcon drawableIcon;
|
private readonly SpriteIcon drawableIcon;
|
||||||
private readonly SpriteText headerText;
|
private readonly SpriteText headerText;
|
||||||
private readonly Box backgroundBox;
|
|
||||||
private readonly Box selectionIndicator;
|
private readonly Box selectionIndicator;
|
||||||
private readonly Container text;
|
private readonly Container text;
|
||||||
public Action<SettingsSection> Action;
|
public Action<SettingsSection> Action;
|
||||||
@ -61,17 +61,14 @@ namespace osu.Game.Overlays.Settings
|
|||||||
|
|
||||||
public SidebarButton()
|
public SidebarButton()
|
||||||
{
|
{
|
||||||
|
BackgroundColour = OsuColour.Gray(60);
|
||||||
|
Background.Alpha = 0;
|
||||||
|
|
||||||
Height = Sidebar.DEFAULT_WIDTH;
|
Height = Sidebar.DEFAULT_WIDTH;
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Children = new Drawable[]
|
|
||||||
|
AddRange(new Drawable[]
|
||||||
{
|
{
|
||||||
backgroundBox = new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Blending = BlendingMode.Additive,
|
|
||||||
Colour = OsuColour.Gray(60),
|
|
||||||
Alpha = 0,
|
|
||||||
},
|
|
||||||
text = new Container
|
text = new Container
|
||||||
{
|
{
|
||||||
Width = Sidebar.DEFAULT_WIDTH,
|
Width = Sidebar.DEFAULT_WIDTH,
|
||||||
@ -101,7 +98,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -113,19 +110,18 @@ namespace osu.Game.Overlays.Settings
|
|||||||
protected override bool OnClick(InputState state)
|
protected override bool OnClick(InputState state)
|
||||||
{
|
{
|
||||||
Action?.Invoke(section);
|
Action?.Invoke(section);
|
||||||
backgroundBox.FlashColour(Color4.White, 400);
|
return base.OnClick(state);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
backgroundBox.FadeTo(0.4f, 200);
|
Background.FadeTo(0.4f, 200);
|
||||||
return base.OnHover(state);
|
return base.OnHover(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
protected override void OnHoverLost(InputState state)
|
||||||
{
|
{
|
||||||
backgroundBox.FadeTo(0, 200);
|
Background.FadeTo(0, 200);
|
||||||
base.OnHoverLost(state);
|
base.OnHoverLost(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ using OpenTK;
|
|||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Toolbar
|
namespace osu.Game.Overlays.Toolbar
|
||||||
{
|
{
|
||||||
@ -74,7 +75,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
private readonly SpriteText tooltip2;
|
private readonly SpriteText tooltip2;
|
||||||
protected FillFlowContainer Flow;
|
protected FillFlowContainer Flow;
|
||||||
|
|
||||||
public ToolbarButton()
|
public ToolbarButton() : base(HoverSampleSet.Loud)
|
||||||
{
|
{
|
||||||
Width = WIDTH;
|
Width = WIDTH;
|
||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
|
@ -174,7 +174,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
sampleHover = audio.Sample.Get(@"Menu/hover");
|
sampleHover = audio.Sample.Get(@"Menu/button-hover");
|
||||||
if (!string.IsNullOrEmpty(sampleName))
|
if (!string.IsNullOrEmpty(sampleName))
|
||||||
sampleClick = audio.Sample.Get($@"Menu/{sampleName}");
|
sampleClick = audio.Sample.Get($@"Menu/{sampleName}");
|
||||||
}
|
}
|
||||||
|
@ -117,13 +117,13 @@ namespace osu.Game.Screens.Menu
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
buttonsPlay.Add(new Button(@"solo", @"select-6", FontAwesome.fa_user, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), WEDGE_WIDTH, Key.P));
|
buttonsPlay.Add(new Button(@"solo", @"button-solo-select", FontAwesome.fa_user, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), WEDGE_WIDTH, Key.P));
|
||||||
buttonsPlay.Add(new Button(@"multi", @"select-5", FontAwesome.fa_users, new Color4(94, 63, 186, 255), () => OnMulti?.Invoke(), 0, Key.M));
|
buttonsPlay.Add(new Button(@"multi", @"button-generic-select", FontAwesome.fa_users, new Color4(94, 63, 186, 255), () => OnMulti?.Invoke(), 0, Key.M));
|
||||||
buttonsPlay.Add(new Button(@"chart", @"select-5", FontAwesome.fa_osu_charts, new Color4(80, 53, 160, 255), () => OnChart?.Invoke()));
|
buttonsPlay.Add(new Button(@"chart", @"button-generic-select", FontAwesome.fa_osu_charts, new Color4(80, 53, 160, 255), () => OnChart?.Invoke()));
|
||||||
|
|
||||||
buttonsTopLevel.Add(new Button(@"play", @"select-1", FontAwesome.fa_osu_logo, new Color4(102, 68, 204, 255), onPlay, WEDGE_WIDTH, Key.P));
|
buttonsTopLevel.Add(new Button(@"play", @"button-play-select", FontAwesome.fa_osu_logo, new Color4(102, 68, 204, 255), onPlay, WEDGE_WIDTH, Key.P));
|
||||||
buttonsTopLevel.Add(new Button(@"osu!editor", @"select-5", FontAwesome.fa_osu_edit_o, new Color4(238, 170, 0, 255), () => OnEdit?.Invoke(), 0, Key.E));
|
buttonsTopLevel.Add(new Button(@"osu!editor", @"button-generic-select", FontAwesome.fa_osu_edit_o, new Color4(238, 170, 0, 255), () => OnEdit?.Invoke(), 0, Key.E));
|
||||||
buttonsTopLevel.Add(new Button(@"osu!direct", string.Empty, FontAwesome.fa_osu_chevron_down_o, new Color4(165, 204, 0, 255), () => OnDirect?.Invoke(), 0, Key.D));
|
buttonsTopLevel.Add(new Button(@"osu!direct", @"button-direct-select", FontAwesome.fa_osu_chevron_down_o, new Color4(165, 204, 0, 255), () => OnDirect?.Invoke(), 0, Key.D));
|
||||||
buttonsTopLevel.Add(new Button(@"exit", string.Empty, FontAwesome.fa_osu_cross_o, new Color4(238, 51, 153, 255), onExit, 0, Key.Q));
|
buttonsTopLevel.Add(new Button(@"exit", string.Empty, FontAwesome.fa_osu_cross_o, new Color4(238, 51, 153, 255), onExit, 0, Key.Q));
|
||||||
|
|
||||||
buttonFlow.AddRange(buttonsPlay);
|
buttonFlow.AddRange(buttonsPlay);
|
||||||
@ -134,7 +134,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
private void load(AudioManager audio, OsuGame game = null)
|
private void load(AudioManager audio, OsuGame game = null)
|
||||||
{
|
{
|
||||||
toolbar = game?.Toolbar;
|
toolbar = game?.Toolbar;
|
||||||
sampleBack = audio.Sample.Get(@"Menu/select-4");
|
sampleBack = audio.Sample.Get(@"Menu/button-back-select");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
@ -180,19 +180,21 @@ namespace osu.Game.Screens.Menu
|
|||||||
State = MenuState.TopLevel;
|
State = MenuState.TopLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onOsuLogo()
|
private bool onOsuLogo()
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
case MenuState.Initial:
|
case MenuState.Initial:
|
||||||
State = MenuState.TopLevel;
|
State = MenuState.TopLevel;
|
||||||
return;
|
return true;
|
||||||
case MenuState.TopLevel:
|
case MenuState.TopLevel:
|
||||||
buttonsTopLevel.First().TriggerOnClick();
|
buttonsTopLevel.First().TriggerOnClick();
|
||||||
return;
|
return false;
|
||||||
case MenuState.Play:
|
case MenuState.Play:
|
||||||
buttonsPlay.First().TriggerOnClick();
|
buttonsPlay.First().TriggerOnClick();
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,10 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
private readonly Triangles triangles;
|
private readonly Triangles triangles;
|
||||||
|
|
||||||
public Action Action;
|
/// <summary>
|
||||||
|
/// Return value decides whether the logo should play its own sample for the click action.
|
||||||
|
/// </summary>
|
||||||
|
public Func<bool> Action;
|
||||||
|
|
||||||
public float SizeForFlow => logo == null ? 0 : logo.DrawSize.X * logo.Scale.X * logoBounceContainer.Scale.X * logoHoverContainer.Scale.X * 0.74f;
|
public float SizeForFlow => logo == null ? 0 : logo.DrawSize.X * logo.Scale.X * logoBounceContainer.Scale.X * logoHoverContainer.Scale.X * 0.74f;
|
||||||
|
|
||||||
@ -248,8 +251,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures, AudioManager audio)
|
private void load(TextureStore textures, AudioManager audio)
|
||||||
{
|
{
|
||||||
sampleClick = audio.Sample.Get(@"Menu/select-2");
|
sampleClick = audio.Sample.Get(@"Menu/osu-logo-select");
|
||||||
sampleBeat = audio.Sample.Get(@"Menu/heartbeat");
|
sampleBeat = audio.Sample.Get(@"Menu/osu-logo-heartbeat");
|
||||||
|
|
||||||
logo.Texture = textures.Get(@"Menu/logo");
|
logo.Texture = textures.Get(@"Menu/logo");
|
||||||
ripple.Texture = textures.Get(@"Menu/logo");
|
ripple.Texture = textures.Get(@"Menu/logo");
|
||||||
@ -354,13 +357,12 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
if (!interactive) return false;
|
if (!interactive) return false;
|
||||||
|
|
||||||
|
if (Action?.Invoke() ?? true)
|
||||||
sampleClick.Play();
|
sampleClick.Play();
|
||||||
|
|
||||||
flashLayer.ClearTransforms();
|
flashLayer.ClearTransforms();
|
||||||
flashLayer.Alpha = 0.4f;
|
flashLayer.Alpha = 0.4f;
|
||||||
flashLayer.FadeOut(1500, Easing.OutExpo);
|
flashLayer.FadeOut(1500, Easing.OutExpo);
|
||||||
|
|
||||||
Action?.Invoke();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ namespace osu.Game.Screens
|
|||||||
if (osuGame != null)
|
if (osuGame != null)
|
||||||
Ruleset.BindTo(osuGame.Ruleset);
|
Ruleset.BindTo(osuGame.Ruleset);
|
||||||
|
|
||||||
sampleExit = audio.Sample.Get(@"UI/melodic-1");
|
sampleExit = audio.Sample.Get(@"UI/screen-back");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnResuming(Screen last)
|
protected override void OnResuming(Screen last)
|
||||||
|
@ -22,8 +22,6 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
public bool IsPaused { get; private set; }
|
public bool IsPaused { get; private set; }
|
||||||
|
|
||||||
public bool AllowExit => IsPaused && pauseOverlay.Alpha == 1;
|
|
||||||
|
|
||||||
public Func<bool> CheckCanPause;
|
public Func<bool> CheckCanPause;
|
||||||
|
|
||||||
private const double pause_cooldown = 1000;
|
private const double pause_cooldown = 1000;
|
||||||
|
@ -310,7 +310,7 @@ namespace osu.Game.Screens.Play
|
|||||||
if (!loadedSuccessfully)
|
if (!loadedSuccessfully)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
(Background as BackgroundScreenBeatmap)?.BlurTo(Vector2.Zero, 1500, Easing.OutQuint);
|
(Background as BackgroundScreenBeatmap)?.BlurTo(Vector2.Zero, 1000, Easing.OutQuint);
|
||||||
|
|
||||||
dimLevel.ValueChanged += dimLevel_ValueChanged;
|
dimLevel.ValueChanged += dimLevel_ValueChanged;
|
||||||
showStoryboard.ValueChanged += showStoryboard_ValueChanged;
|
showStoryboard.ValueChanged += showStoryboard_ValueChanged;
|
||||||
@ -357,7 +357,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected override bool OnExiting(Screen next)
|
protected override bool OnExiting(Screen next)
|
||||||
{
|
{
|
||||||
if (!AllowPause || HasFailed || !ValidForResume || pauseContainer?.AllowExit != false || RulesetContainer?.HasReplayLoaded != false)
|
if (!AllowPause || HasFailed || !ValidForResume || pauseContainer?.IsPaused != false || RulesetContainer?.HasReplayLoaded != false)
|
||||||
{
|
{
|
||||||
// In the case of replays, we may have changed the playback rate.
|
// In the case of replays, we may have changed the playback rate.
|
||||||
applyRateFromMods();
|
applyRateFromMods();
|
||||||
|
@ -31,15 +31,15 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
|
|
||||||
const int rating_range = 10;
|
const int rating_range = 10;
|
||||||
|
|
||||||
var ratings = Metrics.Ratings.ToList().GetRange(1, rating_range); // adjust for API returning weird empty data at 0.
|
var ratings = Metrics.Ratings.Skip(1).Take(rating_range); // adjust for API returning weird empty data at 0.
|
||||||
|
|
||||||
var negativeCount = ratings.GetRange(0, rating_range / 2).Sum();
|
var negativeCount = ratings.Take(rating_range / 2).Sum();
|
||||||
var totalCount = ratings.Sum();
|
var totalCount = ratings.Sum();
|
||||||
|
|
||||||
negativeRatings.Text = negativeCount.ToString();
|
negativeRatings.Text = negativeCount.ToString();
|
||||||
positiveRatings.Text = (totalCount - negativeCount).ToString();
|
positiveRatings.Text = (totalCount - negativeCount).ToString();
|
||||||
ratingsBar.Length = totalCount == 0 ? 0 : (float)negativeCount / totalCount;
|
ratingsBar.Length = totalCount == 0 ? 0 : (float)negativeCount / totalCount;
|
||||||
graph.Values = ratings.GetRange(0, rating_range).Select(r => (float)r);
|
graph.Values = ratings.Take(rating_range).Select(r => (float)r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ using osu.Game.Screens.Select.Filter;
|
|||||||
using Container = osu.Framework.Graphics.Containers.Container;
|
using Container = osu.Framework.Graphics.Containers.Container;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
namespace osu.Game.Screens.Select
|
||||||
@ -60,6 +61,7 @@ namespace osu.Game.Screens.Select
|
|||||||
Group = group,
|
Group = group,
|
||||||
Sort = sort,
|
Sort = sort,
|
||||||
SearchText = searchTextBox.Text,
|
SearchText = searchTextBox.Text,
|
||||||
|
AllowConvertedBeatmaps = showConverted,
|
||||||
Ruleset = ruleset
|
Ruleset = ruleset
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -163,17 +165,24 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();
|
private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();
|
||||||
|
|
||||||
|
private Bindable<bool> showConverted;
|
||||||
|
|
||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(OsuColour colours, OsuGame osu)
|
private void load(OsuColour colours, OsuGame osu, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
sortTabs.AccentColour = colours.GreenLight;
|
sortTabs.AccentColour = colours.GreenLight;
|
||||||
|
|
||||||
|
showConverted = config.GetBindable<bool>(OsuSetting.ShowConvertedBeatmaps);
|
||||||
|
showConverted.ValueChanged += val => updateCriteria();
|
||||||
|
|
||||||
if (osu != null)
|
if (osu != null)
|
||||||
ruleset.BindTo(osu.Ruleset);
|
ruleset.BindTo(osu.Ruleset);
|
||||||
ruleset.ValueChanged += val => FilterChanged?.Invoke(CreateCriteria());
|
ruleset.ValueChanged += val => updateCriteria();
|
||||||
ruleset.TriggerChange();
|
ruleset.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateCriteria() => FilterChanged?.Invoke(CreateCriteria());
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
||||||
|
|
||||||
protected override bool OnMouseMove(InputState state) => true;
|
protected override bool OnMouseMove(InputState state) => true;
|
||||||
|
@ -16,6 +16,7 @@ namespace osu.Game.Screens.Select
|
|||||||
public SortMode Sort;
|
public SortMode Sort;
|
||||||
public string SearchText;
|
public string SearchText;
|
||||||
public RulesetInfo Ruleset;
|
public RulesetInfo Ruleset;
|
||||||
|
public bool AllowConvertedBeatmaps;
|
||||||
|
|
||||||
public void Filter(List<BeatmapGroup> groups)
|
public void Filter(List<BeatmapGroup> groups)
|
||||||
{
|
{
|
||||||
@ -23,7 +24,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
var set = g.BeatmapSet;
|
var set = g.BeatmapSet;
|
||||||
|
|
||||||
bool hasCurrentMode = set.Beatmaps.Any(bm => bm.RulesetID == (Ruleset?.ID ?? 0));
|
bool hasCurrentMode = AllowConvertedBeatmaps || set.Beatmaps.Any(bm => bm.RulesetID == (Ruleset?.ID ?? 0));
|
||||||
|
|
||||||
bool match = hasCurrentMode;
|
bool match = hasCurrentMode;
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Audio.Sample;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
@ -42,9 +44,13 @@ namespace osu.Game.Screens.Select
|
|||||||
beatmapDetails.Leaderboard.ScoreSelected += s => Push(new Results(s));
|
beatmapDetails.Leaderboard.ScoreSelected += s => Push(new Results(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private SampleChannel sampleConfirm;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours, AudioManager audio)
|
||||||
{
|
{
|
||||||
|
sampleConfirm = audio.Sample.Get(@"SongSelect/confirm-selection");
|
||||||
|
|
||||||
Footer.AddButton(@"mods", colours.Yellow, modSelect, Key.F1, float.MaxValue);
|
Footer.AddButton(@"mods", colours.Yellow, modSelect, Key.F1, float.MaxValue);
|
||||||
|
|
||||||
BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.fa_times_circle_o, colours.Purple, null, Key.Number1);
|
BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.fa_times_circle_o, colours.Purple, null, Key.Number1);
|
||||||
@ -128,6 +134,8 @@ namespace osu.Game.Screens.Select
|
|||||||
Beatmap.Value.Track.Looping = false;
|
Beatmap.Value.Track.Looping = false;
|
||||||
Beatmap.Disabled = true;
|
Beatmap.Disabled = true;
|
||||||
|
|
||||||
|
sampleConfirm?.Play();
|
||||||
|
|
||||||
LoadComponentAsync(player = new PlayerLoader(new Player()), l => Push(player));
|
LoadComponentAsync(player = new PlayerLoader(new Player()), l => Push(player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -332,7 +332,11 @@ namespace osu.Game.Screens.Select
|
|||||||
logo.FadeIn(logo_transition, Easing.OutQuint);
|
logo.FadeIn(logo_transition, Easing.OutQuint);
|
||||||
logo.ScaleTo(0.4f, logo_transition, Easing.OutQuint);
|
logo.ScaleTo(0.4f, logo_transition, Easing.OutQuint);
|
||||||
|
|
||||||
logo.Action = () => carouselRaisedStart();
|
logo.Action = () =>
|
||||||
|
{
|
||||||
|
carouselRaisedStart();
|
||||||
|
return false;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LogoExiting(OsuLogo logo)
|
protected override void LogoExiting(OsuLogo logo)
|
||||||
@ -413,7 +417,7 @@ namespace osu.Game.Screens.Select
|
|||||||
if (backgroundModeBeatmap != null)
|
if (backgroundModeBeatmap != null)
|
||||||
{
|
{
|
||||||
backgroundModeBeatmap.Beatmap = beatmap;
|
backgroundModeBeatmap.Beatmap = beatmap;
|
||||||
backgroundModeBeatmap.BlurTo(background_blur, 1000);
|
backgroundModeBeatmap.BlurTo(background_blur, 750, Easing.OutQuint);
|
||||||
backgroundModeBeatmap.FadeTo(1, 250);
|
backgroundModeBeatmap.FadeTo(1, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,21 +193,21 @@ namespace osu.Game.Screens.Tournament
|
|||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuButton
|
new TriangleButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
|
||||||
Text = "Begin random",
|
Text = "Begin random",
|
||||||
Action = teamsContainer.StartScrolling,
|
Action = teamsContainer.StartScrolling,
|
||||||
},
|
},
|
||||||
new OsuButton
|
new TriangleButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
|
||||||
Text = "Stop random",
|
Text = "Stop random",
|
||||||
Action = teamsContainer.StopScrolling,
|
Action = teamsContainer.StopScrolling,
|
||||||
},
|
},
|
||||||
new OsuButton
|
new TriangleButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuButton
|
new TriangleButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
|
||||||
|
@ -17,10 +17,11 @@ using osu.Framework.Graphics.UserInterface;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Game.Graphics.Backgrounds;
|
using osu.Game.Graphics.Backgrounds;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Users
|
namespace osu.Game.Users
|
||||||
{
|
{
|
||||||
public class UserPanel : ClickableContainer, IHasContextMenu
|
public class UserPanel : OsuClickableContainer, IHasContextMenu
|
||||||
{
|
{
|
||||||
private readonly User user;
|
private readonly User user;
|
||||||
private const float height = 100;
|
private const float height = 100;
|
||||||
|
@ -271,6 +271,9 @@
|
|||||||
<Compile Include="Beatmaps\Drawables\BeatmapSetHeader.cs" />
|
<Compile Include="Beatmaps\Drawables\BeatmapSetHeader.cs" />
|
||||||
<Compile Include="Database\DatabaseContextFactory.cs" />
|
<Compile Include="Database\DatabaseContextFactory.cs" />
|
||||||
<Compile Include="Database\IHasPrimaryKey.cs" />
|
<Compile Include="Database\IHasPrimaryKey.cs" />
|
||||||
|
<Compile Include="Graphics\UserInterface\HoverClickSounds.cs" />
|
||||||
|
<Compile Include="Graphics\UserInterface\HoverSounds.cs" />
|
||||||
|
<Compile Include="Graphics\UserInterface\OsuButton.cs" />
|
||||||
<Compile Include="Migrations\20171019041408_InitialCreate.cs" />
|
<Compile Include="Migrations\20171019041408_InitialCreate.cs" />
|
||||||
<Compile Include="Migrations\20171019041408_InitialCreate.Designer.cs">
|
<Compile Include="Migrations\20171019041408_InitialCreate.Designer.cs">
|
||||||
<DependentUpon>20171019041408_InitialCreate.cs</DependentUpon>
|
<DependentUpon>20171019041408_InitialCreate.cs</DependentUpon>
|
||||||
@ -366,7 +369,7 @@
|
|||||||
<Compile Include="Graphics\UserInterface\LoadingAnimation.cs" />
|
<Compile Include="Graphics\UserInterface\LoadingAnimation.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\MenuItemType.cs" />
|
<Compile Include="Graphics\UserInterface\MenuItemType.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\Nub.cs" />
|
<Compile Include="Graphics\UserInterface\Nub.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\OsuButton.cs" />
|
<Compile Include="Graphics\UserInterface\TriangleButton.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\OsuCheckbox.cs" />
|
<Compile Include="Graphics\UserInterface\OsuCheckbox.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\OsuContextMenu.cs" />
|
<Compile Include="Graphics\UserInterface\OsuContextMenu.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\OsuDropdown.cs" />
|
<Compile Include="Graphics\UserInterface\OsuDropdown.cs" />
|
||||||
|
Reference in New Issue
Block a user