mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
Merge branch 'master' into fix-blocked-volume-overlay
This commit is contained in:
commit
1709e22763
11
.github/ISSUE_TEMPLATE.md
vendored
11
.github/ISSUE_TEMPLATE.md
vendored
@ -1,11 +0,0 @@
|
||||
osu!lazer is currently still under heavy development!
|
||||
|
||||
Please ensure that you are making an issue for one of the following:
|
||||
|
||||
- A bug with currently implemented features (not features that don't exist)
|
||||
- A feature you are considering adding, so we can collaborate on feedback and design.
|
||||
- Discussions about technical design decisions
|
||||
|
||||
If your issue qualifies, replace this text with a detailed description of your issue with as much relevant information as you can provide.
|
||||
|
||||
Screenshots and log files are highly welcomed.
|
11
.github/ISSUE_TEMPLATE/bug-issues.md
vendored
11
.github/ISSUE_TEMPLATE/bug-issues.md
vendored
@ -1,14 +1,11 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: For issues regarding encountered game bugs
|
||||
about: Issues regarding encountered bugs.
|
||||
---
|
||||
|
||||
<!-- After you fill in all information, delete all comments in the issue -->
|
||||
|
||||
**Describe your problem:** <!-- Provide any information you believe could be useful -->
|
||||
**Describe the bug:**
|
||||
|
||||
**Screenshots or videos showing encountered issue:**
|
||||
|
||||
**osu!lazer version:** <!-- Provide the version of your osu!lazer, you can find it at the bottom of the screen -->
|
||||
**osu!lazer version:**
|
||||
|
||||
**Logs:** <!-- Attach your osu!lazer logs, you can find them under %appdata%\osu\logs in Windows, or under ~/.local/share/osu/ in Linux and macOS -->
|
||||
**Logs:**
|
||||
|
13
.github/ISSUE_TEMPLATE/crash-issues.md
vendored
13
.github/ISSUE_TEMPLATE/crash-issues.md
vendored
@ -1,16 +1,13 @@
|
||||
---
|
||||
name: Crash Report
|
||||
about: For issues regarding game crashes or permanent freezes
|
||||
about: Issues regarding crashes or permanent freezes.
|
||||
---
|
||||
|
||||
<!-- After you fill in all information, delete all comments in the issue -->
|
||||
|
||||
**Describe your problem:** <!-- Provide any information you believe could be useful -->
|
||||
**Describe the crash:**
|
||||
|
||||
**Screenshots or videos showing encountered issue:**
|
||||
|
||||
**osu!lazer version:** <!-- Provide the version of your osu!lazer, you can find it at the bottom of the screen -->
|
||||
**osu!lazer version:**
|
||||
|
||||
**Logs:** <!-- Attach your osu!lazer logs, you can find them under %appdata%\osu\logs in Windows, or under ~/.local/share/osu/ in Linux and macOS -->
|
||||
**Logs:**
|
||||
|
||||
**Computer Specifications:** <!-- Attach your computer specifications, you can find them by using System Information in Windows, System Monitor in Linux, or About This Mac in macOS -->
|
||||
**Computer Specifications:**
|
||||
|
@ -1,10 +1,7 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Let us know what you would like to see in the game!
|
||||
about: Features you would like to see in the game!
|
||||
---
|
||||
**Describe the new feature:**
|
||||
|
||||
<!-- After you fill in all information, delete all comments in the issue -->
|
||||
|
||||
**Describe the feature:** <!-- Describe the feature you would like to see in the game -->
|
||||
|
||||
**Proposal designs of the feature:** <!-- Attach screenshots of how the feature should look like according to you -->
|
||||
**Proposal designs of the feature:**
|
||||
|
@ -1,10 +1,7 @@
|
||||
---
|
||||
name: Missing for Live
|
||||
about: Let us know the features you need which are available in osu-stable but not lazer
|
||||
about: Features which are available in osu!stable but not yet in osu!lazer.
|
||||
---
|
||||
**Describe the missing feature:**
|
||||
|
||||
<!-- After you fill in all information, delete all comments in the issue -->
|
||||
|
||||
**Describe the feature:** <!-- Describe the missing game feature -->
|
||||
|
||||
**Designs:** <!-- Attach screenshots of how the feature is supposed to look like. For illustrative purpose only; final designs are usually re-imagined from scratch. -->
|
||||
**Proposal designs of the feature:**
|
||||
|
@ -1,5 +1,5 @@
|
||||
#addin "nuget:?package=CodeFileSanity&version=0.0.21"
|
||||
#addin "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2018.2.2"
|
||||
#addin "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2018.3.4"
|
||||
#tool "nuget:?package=NVika.MSBuild&version=1.0.1"
|
||||
var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First();
|
||||
|
||||
@ -46,7 +46,9 @@ Task("InspectCode")
|
||||
OutputFile = "inspectcodereport.xml",
|
||||
});
|
||||
|
||||
StartProcess(nVikaToolPath, @"parsereport ""inspectcodereport.xml"" --treatwarningsaserrors");
|
||||
int returnCode = StartProcess(nVikaToolPath, $@"parsereport ""inspectcodereport.xml"" --treatwarningsaserrors");
|
||||
if (returnCode != 0)
|
||||
throw new Exception($"inspectcode failed with return code {returnCode}");
|
||||
});
|
||||
|
||||
Task("CodeFileSanity")
|
||||
|
@ -14,6 +14,7 @@ using osuTK.Input;
|
||||
using Microsoft.Win32;
|
||||
using osu.Desktop.Updater;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Platform.Windows;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Screens.Menu;
|
||||
@ -35,12 +36,15 @@ namespace osu.Desktop
|
||||
{
|
||||
try
|
||||
{
|
||||
return new StableStorage();
|
||||
if (Host is DesktopGameHost desktopHost)
|
||||
return new StableStorage(desktopHost);
|
||||
}
|
||||
catch
|
||||
catch (Exception e)
|
||||
{
|
||||
return null;
|
||||
Logger.Error(e, "Error while searching for stable install");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
@ -139,8 +143,8 @@ namespace osu.Desktop
|
||||
return null;
|
||||
}
|
||||
|
||||
public StableStorage()
|
||||
: base(string.Empty, null)
|
||||
public StableStorage(DesktopGameHost host)
|
||||
: base(string.Empty, host)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace osu.Desktop.Overlays
|
||||
public UpdateCompleteNotification(string version, Action<string> openUrl = null)
|
||||
{
|
||||
Text = $"You are now running osu!lazer {version}.\nClick to see what's new!";
|
||||
Icon = FontAwesome.CheckSquare;
|
||||
Icon = FontAwesome.Solid.CheckSquare;
|
||||
Activated = delegate
|
||||
{
|
||||
openUrl?.Invoke($"https://osu.ppy.sh/home/changelog/lazer/{version}");
|
||||
|
@ -54,7 +54,7 @@ namespace osu.Desktop.Updater
|
||||
{
|
||||
Text = $"A newer release of osu! has been found ({version} → {latest.TagName}).\n\n"
|
||||
+ "Click here to download the new version, which can be installed over the top of your existing installation",
|
||||
Icon = FontAwesome.Upload,
|
||||
Icon = FontAwesome.Solid.Upload,
|
||||
Activated = () =>
|
||||
{
|
||||
host.OpenUrlExternally(getBestUrl(latest));
|
||||
|
@ -159,7 +159,7 @@ namespace osu.Desktop.Updater
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = FontAwesome.Upload,
|
||||
Icon = FontAwesome.Solid.Upload,
|
||||
Colour = Color4.White,
|
||||
Size = new Vector2(20),
|
||||
}
|
||||
|
@ -23,19 +23,19 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
||||
{
|
||||
Name = @"Fruit Count",
|
||||
Content = fruits.ToString(),
|
||||
Icon = FontAwesome.CircleOutline
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
},
|
||||
new BeatmapStatistic
|
||||
{
|
||||
Name = @"Juice Stream Count",
|
||||
Content = juiceStreams.ToString(),
|
||||
Icon = FontAwesome.Circle
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
},
|
||||
new BeatmapStatistic
|
||||
{
|
||||
Name = @"Banana Shower Count",
|
||||
Content = bananaShowers.ToString(),
|
||||
Icon = FontAwesome.Circle
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
protected override Playfield CreatePlayfield() => new CatchPlayfield(Beatmap.BeatmapInfo.BaseDifficulty, CreateDrawableRepresentation);
|
||||
|
||||
protected override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new CatchPlayfieldAdjustmentContainer();
|
||||
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new CatchPlayfieldAdjustmentContainer();
|
||||
|
||||
protected override PassThroughInputManager CreateInputManager() => new CatchInputManager(Ruleset.RulesetInfo);
|
||||
|
||||
|
@ -42,13 +42,13 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
||||
{
|
||||
Name = @"Note Count",
|
||||
Content = notes.ToString(),
|
||||
Icon = FontAwesome.CircleOutline
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
},
|
||||
new BeatmapStatistic
|
||||
{
|
||||
Name = @"Hold Note Count",
|
||||
Content = holdnotes.ToString(),
|
||||
Icon = FontAwesome.Circle
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
/// <returns>The column which intersects with <paramref name="screenSpacePosition"/>.</returns>
|
||||
public Column GetColumnByPosition(Vector2 screenSpacePosition) => Playfield.GetColumnByPosition(screenSpacePosition);
|
||||
|
||||
protected override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new ManiaPlayfieldAdjustmentContainer();
|
||||
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new ManiaPlayfieldAdjustmentContainer();
|
||||
|
||||
protected override Playfield CreatePlayfield() => new ManiaPlayfield(Beatmap.Stages);
|
||||
|
||||
|
70
osu.Game.Rulesets.Osu.Tests/TestCaseResumeOverlay.cs
Normal file
70
osu.Game.Rulesets.Osu.Tests/TestCaseResumeOverlay.cs
Normal file
@ -0,0 +1,70 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Tests.Visual;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
public class TestCaseResumeOverlay : ManualInputManagerTestCase
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(OsuResumeOverlay),
|
||||
};
|
||||
|
||||
public TestCaseResumeOverlay()
|
||||
{
|
||||
ManualOsuInputManager osuInputManager;
|
||||
CursorContainer cursor;
|
||||
ResumeOverlay resume;
|
||||
|
||||
bool resumeFired = false;
|
||||
|
||||
Child = osuInputManager = new ManualOsuInputManager(new OsuRuleset().RulesetInfo)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
cursor = new CursorContainer(),
|
||||
resume = new OsuResumeOverlay
|
||||
{
|
||||
GameplayCursor = cursor
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
resume.ResumeAction = () => resumeFired = true;
|
||||
|
||||
AddStep("move mouse to center", () => InputManager.MoveMouseTo(ScreenSpaceDrawQuad.Centre));
|
||||
AddStep("show", () => resume.Show());
|
||||
|
||||
AddStep("move mouse away", () => InputManager.MoveMouseTo(ScreenSpaceDrawQuad.TopLeft));
|
||||
AddStep("click", () => osuInputManager.GameClick());
|
||||
AddAssert("not dismissed", () => !resumeFired && resume.State == Visibility.Visible);
|
||||
|
||||
AddStep("move mouse back", () => InputManager.MoveMouseTo(ScreenSpaceDrawQuad.Centre));
|
||||
AddStep("click", () => osuInputManager.GameClick());
|
||||
AddAssert("dismissed", () => resumeFired && resume.State == Visibility.Hidden);
|
||||
}
|
||||
|
||||
private class ManualOsuInputManager : OsuInputManager
|
||||
{
|
||||
public ManualOsuInputManager(RulesetInfo ruleset)
|
||||
: base(ruleset)
|
||||
{
|
||||
}
|
||||
|
||||
public void GameClick()
|
||||
{
|
||||
KeyBindingContainer.TriggerPressed(OsuAction.LeftButton);
|
||||
KeyBindingContainer.TriggerReleased(OsuAction.LeftButton);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -23,19 +23,19 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
|
||||
{
|
||||
Name = @"Circle Count",
|
||||
Content = circles.ToString(),
|
||||
Icon = FontAwesome.CircleOutline
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
},
|
||||
new BeatmapStatistic
|
||||
{
|
||||
Name = @"Slider Count",
|
||||
Content = sliders.ToString(),
|
||||
Icon = FontAwesome.Circle
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
},
|
||||
new BeatmapStatistic
|
||||
{
|
||||
Name = @"Spinner Count",
|
||||
Content = spinners.ToString(),
|
||||
Icon = FontAwesome.Circle
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -16,15 +16,16 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
||||
protected override void InitialiseDefaults()
|
||||
{
|
||||
base.InitialiseDefaults();
|
||||
|
||||
Set(OsuRulesetSetting.SnakingInSliders, true);
|
||||
Set(OsuRulesetSetting.SnakingOutSliders, true);
|
||||
Set(OsuRulesetSetting.ShowCursorTrail, true);
|
||||
}
|
||||
}
|
||||
|
||||
public enum OsuRulesetSetting
|
||||
{
|
||||
SnakingInSliders,
|
||||
SnakingOutSliders
|
||||
SnakingOutSliders,
|
||||
ShowCursorTrail
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,9 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
}
|
||||
|
||||
protected override Playfield CreatePlayfield() => new OsuPlayfieldNoCursor { Size = Vector2.One };
|
||||
protected override Playfield CreatePlayfield() => new OsuPlayfieldNoCursor();
|
||||
|
||||
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new OsuPlayfieldAdjustmentContainer { Size = Vector2.One };
|
||||
|
||||
private class OsuPlayfieldNoCursor : OsuPlayfield
|
||||
{
|
||||
|
@ -2,8 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Edit.Tools;
|
||||
@ -13,7 +11,6 @@ using osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders;
|
||||
using osu.Game.Rulesets.Osu.Edit.Blueprints.Spinners;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Edit.Compose.Components;
|
||||
|
||||
@ -38,8 +35,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
|
||||
public override SelectionHandler CreateSelectionHandler() => new OsuSelectionHandler();
|
||||
|
||||
protected override Container CreateLayerContainer() => new OsuPlayfieldAdjustmentContainer { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
public override SelectionBlueprint CreateBlueprintFor(DrawableHitObject hitObject)
|
||||
{
|
||||
switch (hitObject)
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
public override string Description => "Play with blinds on your screen.";
|
||||
public override string Acronym => "BL";
|
||||
|
||||
public override IconUsage Icon => FontAwesome.Adjust;
|
||||
public override IconUsage Icon => FontAwesome.Solid.Adjust;
|
||||
public override ModType Type => ModType.DifficultyIncrease;
|
||||
|
||||
public override bool Ranked => false;
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
public override string Acronym => "GR";
|
||||
|
||||
public override IconUsage Icon => FontAwesome.ArrowsV;
|
||||
public override IconUsage Icon => FontAwesome.Solid.ArrowsAltV;
|
||||
|
||||
public override ModType Type => ModType.Fun;
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
public override string Name => "Transform";
|
||||
public override string Acronym => "TR";
|
||||
public override IconUsage Icon => FontAwesome.Arrows;
|
||||
public override IconUsage Icon => FontAwesome.Solid.ArrowsAlt;
|
||||
public override ModType Type => ModType.Fun;
|
||||
public override string Description => "Everything rotates. EVERYTHING.";
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
public override string Name => "Wiggle";
|
||||
public override string Acronym => "WG";
|
||||
public override IconUsage Icon => FontAwesome.Certificate;
|
||||
public override IconUsage Icon => FontAwesome.Solid.Certificate;
|
||||
public override ModType Type => ModType.Fun;
|
||||
public override string Description => "They just won't stay still...";
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
new SkinnableDrawable("Play/osu/reversearrow", _ => new SpriteIcon
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Icon = FontAwesome.ChevronRight
|
||||
Icon = FontAwesome.Solid.ChevronRight
|
||||
}, restrictSize: false)
|
||||
};
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(48),
|
||||
Icon = FontAwesome.Asterisk,
|
||||
Icon = FontAwesome.Solid.Asterisk,
|
||||
Shadow = false,
|
||||
},
|
||||
}
|
||||
|
@ -292,7 +292,6 @@ namespace osu.Game.Rulesets.Osu.Replays
|
||||
{
|
||||
// We add intermediate frames for spinning / following a slider here.
|
||||
case Spinner spinner:
|
||||
{
|
||||
Vector2 difference = startPosition - SPINNER_CENTRE;
|
||||
|
||||
float radius = difference.Length;
|
||||
@ -315,9 +314,7 @@ namespace osu.Game.Rulesets.Osu.Replays
|
||||
|
||||
endFrame.Position = endPosition;
|
||||
break;
|
||||
}
|
||||
case Slider slider:
|
||||
{
|
||||
for (double j = FrameDelay; j < slider.Duration; j += FrameDelay)
|
||||
{
|
||||
Vector2 pos = slider.StackedPositionAt(j / slider.Duration);
|
||||
@ -326,7 +323,6 @@ namespace osu.Game.Rulesets.Osu.Replays
|
||||
|
||||
AddFrameToReplay(new OsuReplayFrame(slider.EndTime, new Vector2(slider.StackedEndPosition.X, slider.StackedEndPosition.Y), action));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// We only want to let go of our button if we are at the end of the current replay. Otherwise something is still going on after us so we need to keep the button pressed!
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Osu.Replays
|
||||
{
|
||||
}
|
||||
|
||||
protected override bool IsImportant(OsuReplayFrame frame) => frame?.Actions.Any() ?? false;
|
||||
protected override bool IsImportant(OsuReplayFrame frame) => frame.Actions.Any();
|
||||
|
||||
protected Vector2? Position
|
||||
{
|
||||
|
148
osu.Game.Rulesets.Osu/UI/Cursor/OsuCursor.cs
Normal file
148
osu.Game.Rulesets.Osu/UI/Cursor/OsuCursor.cs
Normal file
@ -0,0 +1,148 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.Cursor
|
||||
{
|
||||
public class OsuCursor : SkinReloadableDrawable
|
||||
{
|
||||
private bool cursorExpand;
|
||||
|
||||
private Bindable<double> cursorScale;
|
||||
private Bindable<bool> autoCursorScale;
|
||||
private readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
private Container expandTarget;
|
||||
private Drawable scaleTarget;
|
||||
|
||||
public OsuCursor()
|
||||
{
|
||||
Origin = Anchor.Centre;
|
||||
Size = new Vector2(28);
|
||||
}
|
||||
|
||||
protected override void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||
{
|
||||
cursorExpand = skin.GetValue<SkinConfiguration, bool>(s => s.CursorExpand ?? true);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config, IBindable<WorkingBeatmap> beatmap)
|
||||
{
|
||||
InternalChild = expandTarget = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Child = scaleTarget = new SkinnableDrawable("cursor", _ => new CircularContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
BorderThickness = Size.X / 6,
|
||||
BorderColour = Color4.White,
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Type = EdgeEffectType.Shadow,
|
||||
Colour = Color4.Pink.Opacity(0.5f),
|
||||
Radius = 5,
|
||||
},
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true,
|
||||
},
|
||||
new CircularContainer
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
BorderThickness = Size.X / 3,
|
||||
BorderColour = Color4.White.Opacity(0.5f),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
new CircularContainer
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Scale = new Vector2(0.1f),
|
||||
Masking = true,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.White,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}, restrictSize: false)
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}
|
||||
};
|
||||
|
||||
this.beatmap.BindTo(beatmap);
|
||||
this.beatmap.ValueChanged += _ => calculateScale();
|
||||
|
||||
cursorScale = config.GetBindable<double>(OsuSetting.GameplayCursorSize);
|
||||
cursorScale.ValueChanged += _ => calculateScale();
|
||||
|
||||
autoCursorScale = config.GetBindable<bool>(OsuSetting.AutoCursorSize);
|
||||
autoCursorScale.ValueChanged += _ => calculateScale();
|
||||
|
||||
calculateScale();
|
||||
}
|
||||
|
||||
private void calculateScale()
|
||||
{
|
||||
float scale = (float)cursorScale.Value;
|
||||
|
||||
if (autoCursorScale.Value && beatmap.Value != null)
|
||||
{
|
||||
// if we have a beatmap available, let's get its circle size to figure out an automatic cursor scale modifier.
|
||||
scale *= (float)(1 - 0.7 * (1 + beatmap.Value.BeatmapInfo.BaseDifficulty.CircleSize - BeatmapDifficulty.DEFAULT_DIFFICULTY) / BeatmapDifficulty.DEFAULT_DIFFICULTY);
|
||||
}
|
||||
|
||||
scaleTarget.Scale = new Vector2(scale);
|
||||
}
|
||||
|
||||
private const float pressed_scale = 1.2f;
|
||||
private const float released_scale = 1f;
|
||||
|
||||
public void Expand()
|
||||
{
|
||||
if (!cursorExpand) return;
|
||||
|
||||
expandTarget.ScaleTo(released_scale).ScaleTo(pressed_scale, 100, Easing.OutQuad);
|
||||
}
|
||||
|
||||
public void Contract() => expandTarget.ScaleTo(released_scale, 100, Easing.OutQuad);
|
||||
}
|
||||
}
|
@ -3,16 +3,10 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Game.Rulesets.Osu.Configuration;
|
||||
using osu.Game.Rulesets.UI;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.Cursor
|
||||
@ -25,6 +19,10 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
||||
|
||||
private readonly Container<Drawable> fadeContainer;
|
||||
|
||||
private readonly Bindable<bool> showTrail = new Bindable<bool>(true);
|
||||
|
||||
private readonly CursorTrail cursorTrail;
|
||||
|
||||
public OsuCursorContainer()
|
||||
{
|
||||
InternalChild = fadeContainer = new Container
|
||||
@ -32,11 +30,19 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new CursorTrail { Depth = 1 }
|
||||
cursorTrail = new CursorTrail { Depth = 1 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(OsuRulesetConfigManager config)
|
||||
{
|
||||
config?.BindWith(OsuRulesetSetting.ShowCursorTrail, showTrail);
|
||||
|
||||
showTrail.BindValueChanged(v => cursorTrail.FadeTo(v.NewValue ? 1 : 0, 200), true);
|
||||
}
|
||||
|
||||
private int downCount;
|
||||
|
||||
private void updateExpandedState()
|
||||
@ -88,136 +94,5 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
||||
fadeContainer.FadeTo(0.05f, 450, Easing.OutQuint);
|
||||
ActiveCursor.ScaleTo(0.8f, 450, Easing.OutQuint);
|
||||
}
|
||||
|
||||
public class OsuCursor : SkinReloadableDrawable
|
||||
{
|
||||
private bool cursorExpand;
|
||||
|
||||
private Bindable<double> cursorScale;
|
||||
private Bindable<bool> autoCursorScale;
|
||||
private readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
private Container expandTarget;
|
||||
private Drawable scaleTarget;
|
||||
|
||||
public OsuCursor()
|
||||
{
|
||||
Origin = Anchor.Centre;
|
||||
Size = new Vector2(28);
|
||||
}
|
||||
|
||||
protected override void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||
{
|
||||
cursorExpand = skin.GetValue<SkinConfiguration, bool>(s => s.CursorExpand ?? true);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config, IBindable<WorkingBeatmap> beatmap)
|
||||
{
|
||||
InternalChild = expandTarget = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Child = scaleTarget = new SkinnableDrawable("cursor", _ => new CircularContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
BorderThickness = Size.X / 6,
|
||||
BorderColour = Color4.White,
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Type = EdgeEffectType.Shadow,
|
||||
Colour = Color4.Pink.Opacity(0.5f),
|
||||
Radius = 5,
|
||||
},
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true,
|
||||
},
|
||||
new CircularContainer
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
BorderThickness = Size.X / 3,
|
||||
BorderColour = Color4.White.Opacity(0.5f),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
new CircularContainer
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Scale = new Vector2(0.1f),
|
||||
Masking = true,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.White,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}, restrictSize: false)
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}
|
||||
};
|
||||
|
||||
this.beatmap.BindTo(beatmap);
|
||||
this.beatmap.ValueChanged += _ => calculateScale();
|
||||
|
||||
cursorScale = config.GetBindable<double>(OsuSetting.GameplayCursorSize);
|
||||
cursorScale.ValueChanged += _ => calculateScale();
|
||||
|
||||
autoCursorScale = config.GetBindable<bool>(OsuSetting.AutoCursorSize);
|
||||
autoCursorScale.ValueChanged += _ => calculateScale();
|
||||
|
||||
calculateScale();
|
||||
}
|
||||
|
||||
private void calculateScale()
|
||||
{
|
||||
float scale = (float)cursorScale.Value;
|
||||
|
||||
if (autoCursorScale.Value && beatmap.Value != null)
|
||||
{
|
||||
// if we have a beatmap available, let's get its circle size to figure out an automatic cursor scale modifier.
|
||||
scale *= (float)(1 - 0.7 * (1 + beatmap.Value.BeatmapInfo.BaseDifficulty.CircleSize - BeatmapDifficulty.DEFAULT_DIFFICULTY) / BeatmapDifficulty.DEFAULT_DIFFICULTY);
|
||||
}
|
||||
|
||||
scaleTarget.Scale = new Vector2(scale);
|
||||
}
|
||||
|
||||
private const float pressed_scale = 1.2f;
|
||||
private const float released_scale = 1f;
|
||||
|
||||
public void Expand()
|
||||
{
|
||||
if (!cursorExpand) return;
|
||||
|
||||
expandTarget.ScaleTo(released_scale).ScaleTo(pressed_scale, 100, Easing.OutQuad);
|
||||
}
|
||||
|
||||
public void Contract() => expandTarget.ScaleTo(released_scale, 100, Easing.OutQuad);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ using osu.Game.Rulesets.Osu.Replays;
|
||||
using osu.Game.Rulesets.Osu.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI
|
||||
{
|
||||
@ -32,7 +33,9 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
|
||||
protected override PassThroughInputManager CreateInputManager() => new OsuInputManager(Ruleset.RulesetInfo);
|
||||
|
||||
protected override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new OsuPlayfieldAdjustmentContainer();
|
||||
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new OsuPlayfieldAdjustmentContainer();
|
||||
|
||||
protected override ResumeOverlay CreateResumeOverlay() => new OsuResumeOverlay();
|
||||
|
||||
public override DrawableHitObject<OsuHitObject> CreateDrawableRepresentation(OsuHitObject h)
|
||||
{
|
||||
|
109
osu.Game.Rulesets.Osu/UI/OsuResumeOverlay.cs
Normal file
109
osu.Game.Rulesets.Osu/UI/OsuResumeOverlay.cs
Normal file
@ -0,0 +1,109 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Rulesets.Osu.UI.Cursor;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI
|
||||
{
|
||||
public class OsuResumeOverlay : ResumeOverlay
|
||||
{
|
||||
private OsuClickToResumeCursor clickToResumeCursor;
|
||||
|
||||
private GameplayCursorContainer localCursorContainer;
|
||||
|
||||
public override CursorContainer LocalCursor => State == Visibility.Visible ? localCursorContainer : null;
|
||||
|
||||
protected override string Message => "Click the orange cursor to resume";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Add(clickToResumeCursor = new OsuClickToResumeCursor { ResumeRequested = Resume });
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
clickToResumeCursor.ShowAt(GameplayCursor.ActiveCursor.Position);
|
||||
|
||||
if (localCursorContainer == null)
|
||||
Add(localCursorContainer = new OsuCursorContainer());
|
||||
}
|
||||
|
||||
public override void Hide()
|
||||
{
|
||||
localCursorContainer?.Expire();
|
||||
localCursorContainer = null;
|
||||
|
||||
base.Hide();
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e) => true;
|
||||
|
||||
public class OsuClickToResumeCursor : OsuCursor, IKeyBindingHandler<OsuAction>
|
||||
{
|
||||
public override bool HandlePositionalInput => true;
|
||||
|
||||
public Action ResumeRequested;
|
||||
|
||||
public OsuClickToResumeCursor()
|
||||
{
|
||||
RelativePositionAxes = Axes.Both;
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
{
|
||||
updateColour();
|
||||
return base.OnHover(e);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(HoverLostEvent e)
|
||||
{
|
||||
updateColour();
|
||||
base.OnHoverLost(e);
|
||||
}
|
||||
|
||||
public bool OnPressed(OsuAction action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case OsuAction.LeftButton:
|
||||
case OsuAction.RightButton:
|
||||
if (!IsHovered) return false;
|
||||
|
||||
this.ScaleTo(new Vector2(2), TRANSITION_TIME, Easing.OutQuint);
|
||||
|
||||
ResumeRequested?.Invoke();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool OnReleased(OsuAction action) => false;
|
||||
|
||||
public void ShowAt(Vector2 activeCursorPosition) => Schedule(() =>
|
||||
{
|
||||
updateColour();
|
||||
this.MoveTo(activeCursorPosition);
|
||||
this.ScaleTo(new Vector2(4)).Then().ScaleTo(Vector2.One, 1000, Easing.OutQuint);
|
||||
});
|
||||
|
||||
private void updateColour()
|
||||
{
|
||||
this.FadeColour(IsHovered ? Color4.White : Color4.Orange, 400, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -34,6 +34,11 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
LabelText = "Snaking out sliders",
|
||||
Bindable = config.GetBindable<bool>(OsuRulesetSetting.SnakingOutSliders)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Cursor trail",
|
||||
Bindable = config.GetBindable<bool>(OsuRulesetSetting.ShowCursorTrail)
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -23,19 +23,19 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
|
||||
{
|
||||
Name = @"Hit Count",
|
||||
Content = hits.ToString(),
|
||||
Icon = FontAwesome.CircleOutline
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
},
|
||||
new BeatmapStatistic
|
||||
{
|
||||
Name = @"Drumroll Count",
|
||||
Content = drumrolls.ToString(),
|
||||
Icon = FontAwesome.Circle
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
},
|
||||
new BeatmapStatistic
|
||||
{
|
||||
Name = @"Swell Count",
|
||||
Content = swells.ToString(),
|
||||
Icon = FontAwesome.Circle
|
||||
Icon = FontAwesome.Regular.Circle
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
|
||||
new SpriteIcon
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Icon = FontAwesome.Asterisk,
|
||||
Icon = FontAwesome.Solid.Asterisk,
|
||||
Shadow = false
|
||||
}
|
||||
};
|
||||
|
@ -81,7 +81,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor() => new TaikoScoreProcessor(this);
|
||||
|
||||
protected override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new TaikoPlayfieldAdjustmentContainer();
|
||||
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new TaikoPlayfieldAdjustmentContainer();
|
||||
|
||||
protected override PassThroughInputManager CreateInputManager() => new TaikoInputManager(Ruleset.RulesetInfo);
|
||||
|
||||
|
@ -278,7 +278,7 @@ namespace osu.Game.Tests.NonVisual
|
||||
|
||||
protected override double AllowedImportantTimeSpan => 1000;
|
||||
|
||||
protected override bool IsImportant(TestReplayFrame frame) => frame?.IsImportant ?? false;
|
||||
protected override bool IsImportant(TestReplayFrame frame) => frame.IsImportant;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,19 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Screens.Play;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
@ -15,14 +21,52 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
protected new PausePlayer Player => (PausePlayer)base.Player;
|
||||
|
||||
private readonly Container content;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
public TestCasePause()
|
||||
: base(new OsuRuleset())
|
||||
{
|
||||
base.Content.Add(content = new MenuCursorContainer { RelativeSizeAxes = Axes.Both });
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestPauseResume()
|
||||
{
|
||||
AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10)));
|
||||
pauseAndConfirm();
|
||||
resumeAndConfirm();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestResumeWithResumeOverlay()
|
||||
{
|
||||
AddStep("move cursor to center", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.Centre));
|
||||
AddUntilStep("wait for hitobjects", () => Player.ScoreProcessor.Health.Value < 1);
|
||||
|
||||
pauseAndConfirm();
|
||||
resume();
|
||||
|
||||
confirmClockRunning(false);
|
||||
confirmPauseOverlayShown(false);
|
||||
|
||||
AddStep("click to resume", () =>
|
||||
{
|
||||
InputManager.PressButton(MouseButton.Left);
|
||||
InputManager.ReleaseButton(MouseButton.Left);
|
||||
});
|
||||
|
||||
confirmClockRunning(true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestResumeWithResumeOverlaySkipped()
|
||||
{
|
||||
AddStep("move cursor to button", () =>
|
||||
InputManager.MoveMouseTo(Player.HUDOverlay.HoldToQuit.Children.OfType<HoldToConfirmContainer>().First().ScreenSpaceDrawQuad.Centre));
|
||||
AddUntilStep("wait for hitobjects", () => Player.ScoreProcessor.Health.Value < 1);
|
||||
|
||||
pauseAndConfirm();
|
||||
resumeAndConfirm();
|
||||
}
|
||||
@ -30,6 +74,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Test]
|
||||
public void TestPauseTooSoon()
|
||||
{
|
||||
AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10)));
|
||||
|
||||
pauseAndConfirm();
|
||||
resumeAndConfirm();
|
||||
|
||||
@ -144,9 +190,16 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
|
||||
|
||||
public new HUDOverlay HUDOverlay => base.HUDOverlay;
|
||||
|
||||
public bool FailOverlayVisible => FailOverlay.State == Visibility.Visible;
|
||||
|
||||
public bool PauseOverlayVisible => PauseOverlay.State == Visibility.Visible;
|
||||
|
||||
public PausePlayer()
|
||||
{
|
||||
PauseOnFocusLost = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
{
|
||||
var overlay = new BeatmapOptionsOverlay();
|
||||
|
||||
overlay.AddButton(@"Remove", @"from unplayed", FontAwesome.TimesCircleOutline, Color4.Purple, null, Key.Number1);
|
||||
overlay.AddButton(@"Clear", @"local scores", FontAwesome.Eraser, Color4.Purple, null, Key.Number2);
|
||||
overlay.AddButton(@"Edit", @"Beatmap", FontAwesome.Pencil, Color4.Yellow, null, Key.Number3);
|
||||
overlay.AddButton(@"Delete", @"Beatmap", FontAwesome.Trash, Color4.Pink, null, Key.Number4, float.MaxValue);
|
||||
overlay.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, Color4.Purple, null, Key.Number1);
|
||||
overlay.AddButton(@"Clear", @"local scores", FontAwesome.Solid.Eraser, Color4.Purple, null, Key.Number2);
|
||||
overlay.AddButton(@"Edit", @"Beatmap", FontAwesome.Solid.PencilAlt, Color4.Yellow, null, Key.Number3);
|
||||
overlay.AddButton(@"Delete", @"Beatmap", FontAwesome.Solid.Trash, Color4.Pink, null, Key.Number4, float.MaxValue);
|
||||
|
||||
Add(overlay);
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
AddStep("dialog #1", () => overlay.Push(new PopupDialog
|
||||
{
|
||||
Icon = FontAwesome.TrashOutline,
|
||||
Icon = FontAwesome.Regular.TrashAlt,
|
||||
HeaderText = @"Confirm deletion of",
|
||||
BodyText = @"Ayase Rie - Yuima-ru*World TVver.",
|
||||
Buttons = new PopupDialogButton[]
|
||||
@ -39,7 +39,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
AddStep("dialog #2", () => overlay.Push(new PopupDialog
|
||||
{
|
||||
Icon = FontAwesome.Gear,
|
||||
Icon = FontAwesome.Solid.Cog,
|
||||
HeaderText = @"What do you want to do with",
|
||||
BodyText = "Camellia as \"Bang Riot\" - Blastix Riotz",
|
||||
Buttons = new PopupDialogButton[]
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
State = Framework.Graphics.Containers.Visibility.Visible,
|
||||
Icon = FontAwesome.AssistiveListeningSystems,
|
||||
Icon = FontAwesome.Solid.AssistiveListeningSystems,
|
||||
HeaderText = @"This is a test popup",
|
||||
BodyText = "I can say lots of stuff and even wrap my words!",
|
||||
Buttons = new PopupDialogButton[]
|
||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
// the null coalesce here is only present to make unit tests work (ruleset dlls aren't copied correctly for testing at the moment)
|
||||
Icon = ruleset?.CreateInstance().CreateIcon() ?? new SpriteIcon { Icon = FontAwesome.QuestionCircleOutline }
|
||||
Icon = ruleset?.CreateInstance().CreateIcon() ?? new SpriteIcon { Icon = FontAwesome.Regular.QuestionCircle }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Configuration
|
||||
|
||||
// Input
|
||||
Set(OsuSetting.MenuCursorSize, 1.0, 0.5f, 2, 0.01);
|
||||
Set(OsuSetting.GameplayCursorSize, 1.0, 0.5f, 2, 0.01);
|
||||
Set(OsuSetting.GameplayCursorSize, 1.0, 0.1f, 2, 0.01);
|
||||
Set(OsuSetting.AutoCursorSize, false);
|
||||
|
||||
Set(OsuSetting.MouseDisableButtons, false);
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Graphics.Containers
|
||||
showNotImplementedError = () => notifications?.Post(new SimpleNotification
|
||||
{
|
||||
Text = @"This link type is not yet supported!",
|
||||
Icon = FontAwesome.LifeSaver,
|
||||
Icon = FontAwesome.Solid.LifeRing,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -42,8 +42,6 @@ namespace osu.Game.Graphics
|
||||
{
|
||||
case Typeface.Exo:
|
||||
return "Exo2.0";
|
||||
case Typeface.FontAwesome:
|
||||
return "FontAwesome";
|
||||
case Typeface.Venera:
|
||||
return "Venera";
|
||||
}
|
||||
@ -101,7 +99,6 @@ namespace osu.Game.Graphics
|
||||
public enum Typeface
|
||||
{
|
||||
Exo,
|
||||
FontAwesome,
|
||||
Venera,
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Graphics
|
||||
{
|
||||
public static class OsuIcon
|
||||
{
|
||||
public static IconUsage Get(int icon) => new IconUsage((char)icon, "OsuFont");
|
||||
public static IconUsage Get(int icon) => new IconUsage((char)icon, "osuFont");
|
||||
|
||||
// ruleset icons in circles
|
||||
public static IconUsage RulesetOsu => Get(0xe000);
|
||||
|
@ -93,7 +93,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Size = new Vector2(item_chevron_size),
|
||||
Icon = FontAwesome.ChevronRight,
|
||||
Icon = FontAwesome.Solid.ChevronRight,
|
||||
Margin = new MarginPadding { Left = padding },
|
||||
Alpha = 0f,
|
||||
});
|
||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Size = new Vector2(12);
|
||||
InternalChild = new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.ExternalLink,
|
||||
Icon = FontAwesome.Solid.ExternalLinkAlt,
|
||||
RelativeSizeAxes = Axes.Both
|
||||
};
|
||||
}
|
||||
|
@ -37,14 +37,14 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Position = new Vector2(1, 1),
|
||||
Colour = Color4.Black,
|
||||
Alpha = 0.4f,
|
||||
Icon = FontAwesome.CircleONotch
|
||||
Icon = FontAwesome.Solid.CircleNotch
|
||||
},
|
||||
spinner = new SpriteIcon
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Icon = FontAwesome.CircleONotch
|
||||
Icon = FontAwesome.Solid.CircleNotch
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Chevron = new SpriteIcon
|
||||
{
|
||||
AlwaysPresent = true,
|
||||
Icon = FontAwesome.ChevronRight,
|
||||
Icon = FontAwesome.Solid.ChevronRight,
|
||||
Colour = Color4.Black,
|
||||
Alpha = 0.5f,
|
||||
Size = new Vector2(8),
|
||||
@ -244,7 +244,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
},
|
||||
Icon = new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.ChevronDown,
|
||||
Icon = FontAwesome.Solid.ChevronDown,
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Margin = new MarginPadding { Right = 4 },
|
||||
|
@ -108,7 +108,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public CapsWarning()
|
||||
{
|
||||
Icon = FontAwesome.Warning;
|
||||
Icon = FontAwesome.Solid.ExclamationTriangle;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -254,7 +254,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.EllipsisH,
|
||||
Icon = FontAwesome.Solid.EllipsisH,
|
||||
Size = new Vector2(14),
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
|
@ -99,7 +99,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
icon = new SpriteIcon
|
||||
{
|
||||
Size = new Vector2(14),
|
||||
Icon = FontAwesome.CircleOutline,
|
||||
Icon = FontAwesome.Regular.Circle,
|
||||
Shadow = true,
|
||||
},
|
||||
},
|
||||
@ -120,12 +120,12 @@ namespace osu.Game.Graphics.UserInterface
|
||||
if (selected.NewValue)
|
||||
{
|
||||
fadeIn();
|
||||
icon.Icon = FontAwesome.CheckCircleOutline;
|
||||
icon.Icon = FontAwesome.Regular.CheckCircle;
|
||||
}
|
||||
else
|
||||
{
|
||||
fadeOut();
|
||||
icon.Icon = FontAwesome.CircleOutline;
|
||||
icon.Icon = FontAwesome.Regular.Circle;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.Search,
|
||||
Icon = FontAwesome.Solid.Search,
|
||||
Origin = Anchor.CentreRight,
|
||||
Anchor = Anchor.CentreRight,
|
||||
Margin = new MarginPadding { Right = 10 },
|
||||
|
@ -143,7 +143,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Child = Icon = new SpriteIcon
|
||||
{
|
||||
Size = new Vector2(star_size),
|
||||
Icon = FontAwesome.Star,
|
||||
Icon = FontAwesome.Solid.Star,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
};
|
||||
|
@ -258,8 +258,8 @@ namespace osu.Game.Online.Leaderboards
|
||||
|
||||
protected virtual IEnumerable<LeaderboardScoreStatistic> GetStatistics(ScoreInfo model) => new[]
|
||||
{
|
||||
new LeaderboardScoreStatistic(FontAwesome.Link, "Max Combo", model.MaxCombo.ToString()),
|
||||
new LeaderboardScoreStatistic(FontAwesome.Crosshairs, "Accuracy", string.Format(model.Accuracy % 1 == 0 ? @"{0:P0}" : @"{0:P2}", model.Accuracy))
|
||||
new LeaderboardScoreStatistic(FontAwesome.Solid.Link, "Max Combo", model.MaxCombo.ToString()),
|
||||
new LeaderboardScoreStatistic(FontAwesome.Solid.Crosshairs, "Accuracy", string.Format(model.Accuracy % 1 == 0 ? @"{0:P0}" : @"{0:P2}", model.Accuracy))
|
||||
};
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
@ -353,7 +353,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
Size = new Vector2(icon_size),
|
||||
Rotation = 45,
|
||||
Colour = OsuColour.FromHex(@"3087ac"),
|
||||
Icon = FontAwesome.Square,
|
||||
Icon = FontAwesome.Solid.Square,
|
||||
Shadow = true,
|
||||
},
|
||||
new SpriteIcon
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
|
||||
public MessagePlaceholder(string message)
|
||||
{
|
||||
AddIcon(FontAwesome.ExclamationCircle, cp =>
|
||||
AddIcon(FontAwesome.Solid.ExclamationCircle, cp =>
|
||||
{
|
||||
cp.Font = cp.Font.With(size: TEXT_SIZE);
|
||||
cp.Padding = new MarginPadding { Right = 10 };
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
Action = () => Action?.Invoke(),
|
||||
Child = icon = new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.Refresh,
|
||||
Icon = FontAwesome.Solid.Sync,
|
||||
Size = new Vector2(TEXT_SIZE),
|
||||
Shadow = true,
|
||||
},
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Online.Multiplayer.GameTypes
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = FontAwesome.Refresh,
|
||||
Icon = FontAwesome.Solid.Sync,
|
||||
Size = new Vector2(size),
|
||||
Colour = colours.Blue,
|
||||
Shadow = false,
|
||||
|
@ -26,14 +26,14 @@ namespace osu.Game.Online.Multiplayer.GameTypes
|
||||
{
|
||||
new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.Refresh,
|
||||
Icon = FontAwesome.Solid.Sync,
|
||||
Size = new Vector2(size * 0.75f),
|
||||
Colour = colours.Blue,
|
||||
Shadow = false,
|
||||
},
|
||||
new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.Refresh,
|
||||
Icon = FontAwesome.Solid.Sync,
|
||||
Size = new Vector2(size * 0.75f),
|
||||
Colour = colours.Pink,
|
||||
Shadow = false,
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Online.Multiplayer.GameTypes
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = FontAwesome.ClockOutline,
|
||||
Icon = FontAwesome.Regular.Clock,
|
||||
Size = new Vector2(size),
|
||||
Colour = colours.Blue,
|
||||
Shadow = false
|
||||
|
@ -254,6 +254,12 @@ namespace osu.Game
|
||||
if (menuScreen.IsCurrentScreen())
|
||||
menuScreen.LoadToSolo();
|
||||
|
||||
// we might even already be at the song
|
||||
if (Beatmap.Value.BeatmapSetInfo.Hash == databasedSet.Hash)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Use first beatmap available for current ruleset, else switch ruleset.
|
||||
var first = databasedSet.Beatmaps.Find(b => b.Ruleset == ruleset.Value) ?? databasedSet.Beatmaps.First();
|
||||
|
||||
@ -579,7 +585,7 @@ namespace osu.Game
|
||||
{
|
||||
Schedule(() => notifications.Post(new SimpleNotification
|
||||
{
|
||||
Icon = entry.Level == LogLevel.Important ? FontAwesome.ExclamationCircle : FontAwesome.Bomb,
|
||||
Icon = entry.Level == LogLevel.Important ? FontAwesome.Solid.ExclamationCircle : FontAwesome.Solid.Bomb,
|
||||
Text = entry.Message + (entry.Exception != null && IsDeployedBuild ? "\n\nThis error has been automatically reported to the devs." : string.Empty),
|
||||
}));
|
||||
}
|
||||
@ -587,7 +593,7 @@ namespace osu.Game
|
||||
{
|
||||
Schedule(() => notifications.Post(new SimpleNotification
|
||||
{
|
||||
Icon = FontAwesome.EllipsisH,
|
||||
Icon = FontAwesome.Solid.EllipsisH,
|
||||
Text = "Subsequent messages have been logged. Click to view log files.",
|
||||
Activated = () =>
|
||||
{
|
||||
|
@ -75,10 +75,10 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Direction = FillDirection.Horizontal,
|
||||
Children = new[]
|
||||
{
|
||||
length = new Statistic(FontAwesome.ClockOutline, "Length") { Width = 0.25f },
|
||||
bpm = new Statistic(FontAwesome.Circle, "BPM") { Width = 0.25f },
|
||||
circleCount = new Statistic(FontAwesome.CircleOutline, "Circle Count") { Width = 0.25f },
|
||||
sliderCount = new Statistic(FontAwesome.Circle, "Slider Count") { Width = 0.25f },
|
||||
length = new Statistic(FontAwesome.Regular.Clock, "Length") { Width = 0.25f },
|
||||
bpm = new Statistic(FontAwesome.Regular.Circle, "BPM") { Width = 0.25f },
|
||||
circleCount = new Statistic(FontAwesome.Regular.Circle, "Circle Count") { Width = 0.25f },
|
||||
sliderCount = new Statistic(FontAwesome.Regular.Circle, "Slider Count") { Width = 0.25f },
|
||||
},
|
||||
};
|
||||
}
|
||||
@ -121,7 +121,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = FontAwesome.Square,
|
||||
Icon = FontAwesome.Solid.Square,
|
||||
Size = new Vector2(13),
|
||||
Rotation = 45,
|
||||
Colour = OsuColour.FromHex(@"441288"),
|
||||
|
@ -131,8 +131,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Margin = new MarginPadding { Top = 5 },
|
||||
Children = new[]
|
||||
{
|
||||
plays = new Statistic(FontAwesome.PlayCircle),
|
||||
favourites = new Statistic(FontAwesome.Heart),
|
||||
plays = new Statistic(FontAwesome.Solid.PlayCircle),
|
||||
favourites = new Statistic(FontAwesome.Solid.Heart),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
Depth = -1,
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Icon = FontAwesome.Download,
|
||||
Icon = FontAwesome.Solid.Download,
|
||||
Size = new Vector2(16),
|
||||
Margin = new MarginPadding { Right = 5 },
|
||||
},
|
||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = FontAwesome.HeartOutline,
|
||||
Icon = FontAwesome.Regular.Heart,
|
||||
Size = new Vector2(18),
|
||||
Shadow = false,
|
||||
},
|
||||
@ -59,12 +59,12 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
if (favourited.NewValue)
|
||||
{
|
||||
pink.FadeIn(200);
|
||||
icon.Icon = FontAwesome.Heart;
|
||||
icon.Icon = FontAwesome.Solid.Heart;
|
||||
}
|
||||
else
|
||||
{
|
||||
pink.FadeOut(200);
|
||||
icon.Icon = FontAwesome.HeartOutline;
|
||||
icon.Icon = FontAwesome.Regular.Heart;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Chat
|
||||
HeaderText = "Just checking...";
|
||||
BodyText = $"You are about to leave osu! and open the following link in a web browser:\n\n{url}";
|
||||
|
||||
Icon = FontAwesome.Warning;
|
||||
Icon = FontAwesome.Solid.ExclamationTriangle;
|
||||
|
||||
Buttons = new PopupDialogButton[]
|
||||
{
|
||||
|
@ -74,7 +74,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Icon = FontAwesome.CheckCircle,
|
||||
Icon = FontAwesome.Solid.CheckCircle,
|
||||
Size = new Vector2(text_size),
|
||||
Shadow = false,
|
||||
Margin = new MarginPadding { Right = 10f },
|
||||
@ -121,7 +121,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
{
|
||||
new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.User,
|
||||
Icon = FontAwesome.Solid.User,
|
||||
Size = new Vector2(text_size - 2),
|
||||
Shadow = false,
|
||||
Margin = new MarginPadding { Top = 1 },
|
||||
|
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
|
||||
AddInternal(new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.Comments,
|
||||
Icon = FontAwesome.Solid.Comments,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Size = new Vector2(20),
|
||||
|
@ -117,7 +117,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
};
|
||||
}
|
||||
|
||||
protected virtual IconUsage DisplayIcon => FontAwesome.Hashtag;
|
||||
protected virtual IconUsage DisplayIcon => FontAwesome.Solid.Hashtag;
|
||||
|
||||
protected virtual bool ShowCloseOnHover => true;
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
private readonly OsuSpriteText username;
|
||||
private readonly Avatar avatarContainer;
|
||||
|
||||
protected override IconUsage DisplayIcon => FontAwesome.At;
|
||||
protected override IconUsage DisplayIcon => FontAwesome.Solid.At;
|
||||
|
||||
public PrivateChannelTabItem(Channel value)
|
||||
: base(value)
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Scale = new Vector2(0.75f),
|
||||
Icon = FontAwesome.Close,
|
||||
Icon = FontAwesome.Solid.TimesCircle,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
};
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ namespace osu.Game.Overlays.Dialog
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Icon = FontAwesome.Close,
|
||||
Icon = FontAwesome.Solid.TimesCircle,
|
||||
Size = new Vector2(50),
|
||||
},
|
||||
},
|
||||
|
@ -186,8 +186,8 @@ namespace osu.Game.Overlays.Direct
|
||||
Margin = new MarginPadding { Top = vertical_padding, Right = vertical_padding },
|
||||
Children = new[]
|
||||
{
|
||||
new Statistic(FontAwesome.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0),
|
||||
new Statistic(FontAwesome.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
||||
new Statistic(FontAwesome.Solid.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0),
|
||||
new Statistic(FontAwesome.Solid.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
||||
},
|
||||
},
|
||||
statusContainer = new FillFlowContainer
|
||||
@ -206,12 +206,12 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
if (SetInfo.OnlineInfo?.HasVideo ?? false)
|
||||
{
|
||||
statusContainer.Add(new IconPill(FontAwesome.Film));
|
||||
statusContainer.Add(new IconPill(FontAwesome.Solid.Film));
|
||||
}
|
||||
|
||||
if (SetInfo.OnlineInfo?.HasStoryboard ?? false)
|
||||
{
|
||||
statusContainer.Add(new IconPill(FontAwesome.Image));
|
||||
statusContainer.Add(new IconPill(FontAwesome.Solid.Image));
|
||||
}
|
||||
|
||||
statusContainer.Add(new BeatmapSetOnlineStatusPill
|
||||
|
@ -161,8 +161,8 @@ namespace osu.Game.Overlays.Direct
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Statistic(FontAwesome.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0),
|
||||
new Statistic(FontAwesome.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
||||
new Statistic(FontAwesome.Solid.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0),
|
||||
new Statistic(FontAwesome.Solid.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
||||
new FillFlowContainer
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
@ -211,12 +211,12 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
if (SetInfo.OnlineInfo?.HasVideo ?? false)
|
||||
{
|
||||
statusContainer.Add(new IconPill(FontAwesome.Film) { IconSize = new Vector2(20) });
|
||||
statusContainer.Add(new IconPill(FontAwesome.Solid.Film) { IconSize = new Vector2(20) });
|
||||
}
|
||||
|
||||
if (SetInfo.OnlineInfo?.HasStoryboard ?? false)
|
||||
{
|
||||
statusContainer.Add(new IconPill(FontAwesome.Image) { IconSize = new Vector2(20) });
|
||||
statusContainer.Add(new IconPill(FontAwesome.Solid.Image) { IconSize = new Vector2(20) });
|
||||
}
|
||||
|
||||
statusContainer.Add(new BeatmapSetOnlineStatusPill
|
||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Direct
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(13),
|
||||
Icon = FontAwesome.Download,
|
||||
Icon = FontAwesome.Solid.Download,
|
||||
},
|
||||
checkmark = new SpriteIcon
|
||||
{
|
||||
@ -57,7 +57,7 @@ namespace osu.Game.Overlays.Direct
|
||||
Origin = Anchor.Centre,
|
||||
X = 8,
|
||||
Size = Vector2.Zero,
|
||||
Icon = FontAwesome.Check,
|
||||
Icon = FontAwesome.Solid.Check,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,5 +116,6 @@ namespace osu.Game.Overlays.Direct
|
||||
Ranked,
|
||||
Rating,
|
||||
Plays,
|
||||
Favourites,
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ namespace osu.Game.Overlays.Direct
|
||||
Origin = Anchor.Centre,
|
||||
FillMode = FillMode.Fit,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Icon = FontAwesome.Play,
|
||||
Icon = FontAwesome.Solid.Play,
|
||||
},
|
||||
loadingAnimation = new LoadingAnimation
|
||||
{
|
||||
@ -116,7 +116,7 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
private void playingStateChanged(ValueChangedEvent<bool> e)
|
||||
{
|
||||
icon.Icon = e.NewValue ? FontAwesome.Stop : FontAwesome.Play;
|
||||
icon.Icon = e.NewValue ? FontAwesome.Solid.Stop : FontAwesome.Solid.Play;
|
||||
icon.FadeColour(e.NewValue || IsHovered ? hoverColour : Color4.White, 120, Easing.InOutQuint);
|
||||
|
||||
if (e.NewValue)
|
||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
{
|
||||
public class GlobalKeyBindingsSection : SettingsSection
|
||||
{
|
||||
public override IconUsage Icon => FontAwesome.Globe;
|
||||
public override IconUsage Icon => FontAwesome.Solid.Globe;
|
||||
public override string Header => "Global";
|
||||
|
||||
public GlobalKeyBindingsSection(GlobalActionContainer manager)
|
||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Overlays
|
||||
Y = -15,
|
||||
Size = new Vector2(15),
|
||||
Shadow = true,
|
||||
Icon = FontAwesome.ChevronLeft
|
||||
Icon = FontAwesome.Solid.ChevronLeft
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
|
@ -164,7 +164,7 @@ namespace osu.Game.Overlays.Music
|
||||
Anchor = Anchor.TopLeft;
|
||||
Origin = Anchor.TopLeft;
|
||||
Size = new Vector2(12);
|
||||
Icon = FontAwesome.Bars;
|
||||
Icon = FontAwesome.Solid.Bars;
|
||||
Alpha = 0f;
|
||||
Margin = new MarginPadding { Left = 5, Top = 2 };
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ namespace osu.Game.Overlays
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Action = prev,
|
||||
Icon = FontAwesome.StepBackward,
|
||||
Icon = FontAwesome.Solid.StepBackward,
|
||||
},
|
||||
playButton = new MusicIconButton
|
||||
{
|
||||
@ -157,14 +157,14 @@ namespace osu.Game.Overlays
|
||||
Scale = new Vector2(1.4f),
|
||||
IconScale = new Vector2(1.4f),
|
||||
Action = play,
|
||||
Icon = FontAwesome.PlayCircleOutline,
|
||||
Icon = FontAwesome.Regular.PlayCircle,
|
||||
},
|
||||
nextButton = new MusicIconButton
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Action = () => next(),
|
||||
Icon = FontAwesome.StepForward,
|
||||
Icon = FontAwesome.Solid.StepForward,
|
||||
},
|
||||
}
|
||||
},
|
||||
@ -173,7 +173,7 @@ namespace osu.Game.Overlays
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.CentreRight,
|
||||
Position = new Vector2(-bottom_black_area_height / 2, 0),
|
||||
Icon = FontAwesome.Bars,
|
||||
Icon = FontAwesome.Solid.Bars,
|
||||
Action = () => playlist.ToggleVisibility(),
|
||||
},
|
||||
}
|
||||
@ -264,13 +264,13 @@ namespace osu.Game.Overlays
|
||||
progressBar.EndTime = track.Length;
|
||||
progressBar.CurrentTime = track.CurrentTime;
|
||||
|
||||
playButton.Icon = track.IsRunning ? FontAwesome.PauseCircleOutline : FontAwesome.PlayCircleOutline;
|
||||
playButton.Icon = track.IsRunning ? FontAwesome.Regular.PauseCircle : FontAwesome.Regular.PlayCircle;
|
||||
}
|
||||
else
|
||||
{
|
||||
progressBar.CurrentTime = 0;
|
||||
progressBar.EndTime = 1;
|
||||
playButton.Icon = FontAwesome.PlayCircleOutline;
|
||||
playButton.Icon = FontAwesome.Regular.PlayCircle;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = FontAwesome.TimesCircle,
|
||||
Icon = FontAwesome.Solid.TimesCircle,
|
||||
Size = new Vector2(20),
|
||||
}
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
{
|
||||
public ProgressCompletionNotification()
|
||||
{
|
||||
Icon = FontAwesome.Check;
|
||||
Icon = FontAwesome.Solid.Check;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
}
|
||||
}
|
||||
|
||||
private IconUsage icon = FontAwesome.InfoCircle;
|
||||
private IconUsage icon = FontAwesome.Solid.InfoCircle;
|
||||
|
||||
public IconUsage Icon
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Icon = FontAwesome.Heart,
|
||||
Icon = FontAwesome.Solid.Heart,
|
||||
Scale = new Vector2(0.45f),
|
||||
}
|
||||
};
|
||||
|
@ -415,16 +415,16 @@ namespace osu.Game.Overlays.Profile
|
||||
websiteWithoutProtcol = websiteWithoutProtcol.Substring(protocolIndex + 2);
|
||||
}
|
||||
|
||||
tryAddInfoRightLine(FontAwesome.MapMarker, user.Location);
|
||||
tryAddInfoRightLine(FontAwesome.HeartOutline, user.Interests);
|
||||
tryAddInfoRightLine(FontAwesome.Suitcase, user.Occupation);
|
||||
tryAddInfoRightLine(FontAwesome.Solid.MapMarker, user.Location);
|
||||
tryAddInfoRightLine(FontAwesome.Regular.Heart, user.Interests);
|
||||
tryAddInfoRightLine(FontAwesome.Solid.Suitcase, user.Occupation);
|
||||
infoTextRight.NewParagraph();
|
||||
if (!string.IsNullOrEmpty(user.Twitter))
|
||||
tryAddInfoRightLine(FontAwesome.Twitter, "@" + user.Twitter, $@"https://twitter.com/{user.Twitter}");
|
||||
tryAddInfoRightLine(FontAwesome.Gamepad, user.Discord);
|
||||
tryAddInfoRightLine(FontAwesome.Skype, user.Skype, @"skype:" + user.Skype + @"?chat");
|
||||
tryAddInfoRightLine(FontAwesome.Lastfm, user.Lastfm, $@"https://last.fm/users/{user.Lastfm}");
|
||||
tryAddInfoRightLine(FontAwesome.Globe, websiteWithoutProtcol, user.Website);
|
||||
tryAddInfoRightLine(FontAwesome.Brands.Twitter, "@" + user.Twitter, $@"https://twitter.com/{user.Twitter}");
|
||||
tryAddInfoRightLine(FontAwesome.Solid.Gamepad, user.Discord);
|
||||
tryAddInfoRightLine(FontAwesome.Brands.Skype, user.Skype, @"skype:" + user.Skype + @"?chat");
|
||||
tryAddInfoRightLine(FontAwesome.Brands.Lastfm, user.Lastfm, $@"https://last.fm/users/{user.Lastfm}");
|
||||
tryAddInfoRightLine(FontAwesome.Solid.Globe, websiteWithoutProtcol, user.Website);
|
||||
|
||||
if (user.Statistics != null)
|
||||
{
|
||||
|
@ -37,8 +37,8 @@ namespace osu.Game.Overlays.SearchableList
|
||||
Direction = FillDirection.Horizontal,
|
||||
Children = new[]
|
||||
{
|
||||
new DisplayStyleToggleButton(FontAwesome.ThLarge, PanelDisplayStyle.Grid, DisplayStyle),
|
||||
new DisplayStyleToggleButton(FontAwesome.ListUl, PanelDisplayStyle.List, DisplayStyle),
|
||||
new DisplayStyleToggleButton(FontAwesome.Solid.ThLarge, PanelDisplayStyle.Grid, DisplayStyle),
|
||||
new DisplayStyleToggleButton(FontAwesome.Solid.ListUl, PanelDisplayStyle.List, DisplayStyle),
|
||||
},
|
||||
},
|
||||
Dropdown = new SlimEnumDropdown<T>
|
||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
public class AudioSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Audio";
|
||||
public override IconUsage Icon => FontAwesome.VolumeUp;
|
||||
public override IconUsage Icon => FontAwesome.Solid.VolumeUp;
|
||||
|
||||
public AudioSection()
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
public class DebugSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Debug";
|
||||
public override IconUsage Icon => FontAwesome.Bug;
|
||||
public override IconUsage Icon => FontAwesome.Solid.Bug;
|
||||
|
||||
public DebugSection()
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
public class GameplaySection : SettingsSection
|
||||
{
|
||||
public override string Header => "Gameplay";
|
||||
public override IconUsage Icon => FontAwesome.CircleOutline;
|
||||
public override IconUsage Icon => FontAwesome.Regular.Circle;
|
||||
|
||||
public GameplaySection()
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Icon = FontAwesome.CircleOutline,
|
||||
Icon = FontAwesome.Regular.Circle,
|
||||
Size = new Vector2(14),
|
||||
});
|
||||
|
||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
public class GeneralSection : SettingsSection
|
||||
{
|
||||
public override string Header => "General";
|
||||
public override IconUsage Icon => FontAwesome.Gear;
|
||||
public override IconUsage Icon => FontAwesome.Solid.Cog;
|
||||
|
||||
public GeneralSection()
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
public class GraphicsSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Graphics";
|
||||
public override IconUsage Icon => FontAwesome.Laptop;
|
||||
public override IconUsage Icon => FontAwesome.Solid.Laptop;
|
||||
|
||||
public GraphicsSection()
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
public class InputSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Input";
|
||||
public override IconUsage Icon => FontAwesome.KeyboardOutline;
|
||||
public override IconUsage Icon => FontAwesome.Regular.Keyboard;
|
||||
|
||||
public InputSection(KeyBindingOverlay keyConfig)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
{
|
||||
BodyText = "Everything?";
|
||||
|
||||
Icon = FontAwesome.TrashOutline;
|
||||
Icon = FontAwesome.Regular.TrashAlt;
|
||||
HeaderText = @"Confirm deletion of";
|
||||
Buttons = new PopupDialogButton[]
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
public class MaintenanceSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Maintenance";
|
||||
public override IconUsage Icon => FontAwesome.Wrench;
|
||||
public override IconUsage Icon => FontAwesome.Solid.Wrench;
|
||||
|
||||
public MaintenanceSection()
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
public class OnlineSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Online";
|
||||
public override IconUsage Icon => FontAwesome.Globe;
|
||||
public override IconUsage Icon => FontAwesome.Solid.GlobeAsia;
|
||||
|
||||
public OnlineSection()
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
|
||||
public override string Header => "Skin";
|
||||
|
||||
public override IconUsage Icon => FontAwesome.PaintBrush;
|
||||
public override IconUsage Icon => FontAwesome.Solid.PaintBrush;
|
||||
|
||||
private readonly Bindable<SkinInfo> dropdownBindable = new Bindable<SkinInfo> { Default = SkinInfo.Default };
|
||||
private readonly Bindable<int> configBindable = new Bindable<int>();
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Social
|
||||
protected override Color4 BackgroundColour => OsuColour.FromHex(@"38202e");
|
||||
|
||||
protected override SocialTab DefaultTab => SocialTab.AllPlayers;
|
||||
protected override IconUsage Icon => FontAwesome.Users;
|
||||
protected override IconUsage Icon => FontAwesome.Solid.Users;
|
||||
|
||||
protected override Drawable CreateHeaderText()
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
new ToolbarMusicButton(),
|
||||
//new ToolbarButton
|
||||
//{
|
||||
// Icon = FontAwesome.search
|
||||
// Icon = FontAwesome.Solid.search
|
||||
//},
|
||||
userButton = new ToolbarUserButton(),
|
||||
new ToolbarNotificationButton(),
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user