mirror of
https://github.com/ppy/osu.git
synced 2025-01-16 17:32:54 +08:00
Merge pull request #4 from ppy/master
This commit is contained in:
commit
1be92c7d6b
@ -1,5 +1,5 @@
|
|||||||
#addin "nuget:?package=CodeFileSanity&version=0.0.21"
|
#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"
|
#tool "nuget:?package=NVika.MSBuild&version=1.0.1"
|
||||||
var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First();
|
var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First();
|
||||||
|
|
||||||
@ -46,7 +46,9 @@ Task("InspectCode")
|
|||||||
OutputFile = "inspectcodereport.xml",
|
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")
|
Task("CodeFileSanity")
|
||||||
|
@ -110,7 +110,7 @@ namespace osu.Desktop.Overlays
|
|||||||
public UpdateCompleteNotification(string version, Action<string> openUrl = null)
|
public UpdateCompleteNotification(string version, Action<string> openUrl = null)
|
||||||
{
|
{
|
||||||
Text = $"You are now running osu!lazer {version}.\nClick to see what's new!";
|
Text = $"You are now running osu!lazer {version}.\nClick to see what's new!";
|
||||||
Icon = FontAwesome.CheckSquare;
|
Icon = FontAwesome.Solid.CheckSquare;
|
||||||
Activated = delegate
|
Activated = delegate
|
||||||
{
|
{
|
||||||
openUrl?.Invoke($"https://osu.ppy.sh/home/changelog/lazer/{version}");
|
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"
|
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",
|
+ "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 = () =>
|
Activated = () =>
|
||||||
{
|
{
|
||||||
host.OpenUrlExternally(getBestUrl(latest));
|
host.OpenUrlExternally(getBestUrl(latest));
|
||||||
|
@ -159,7 +159,7 @@ namespace osu.Desktop.Updater
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Icon = FontAwesome.Upload,
|
Icon = FontAwesome.Solid.Upload,
|
||||||
Colour = Color4.White,
|
Colour = Color4.White,
|
||||||
Size = new Vector2(20),
|
Size = new Vector2(20),
|
||||||
}
|
}
|
||||||
|
@ -23,19 +23,19 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
|||||||
{
|
{
|
||||||
Name = @"Fruit Count",
|
Name = @"Fruit Count",
|
||||||
Content = fruits.ToString(),
|
Content = fruits.ToString(),
|
||||||
Icon = FontAwesome.CircleOutline
|
Icon = FontAwesome.Regular.Circle
|
||||||
},
|
},
|
||||||
new BeatmapStatistic
|
new BeatmapStatistic
|
||||||
{
|
{
|
||||||
Name = @"Juice Stream Count",
|
Name = @"Juice Stream Count",
|
||||||
Content = juiceStreams.ToString(),
|
Content = juiceStreams.ToString(),
|
||||||
Icon = FontAwesome.Circle
|
Icon = FontAwesome.Regular.Circle
|
||||||
},
|
},
|
||||||
new BeatmapStatistic
|
new BeatmapStatistic
|
||||||
{
|
{
|
||||||
Name = @"Banana Shower Count",
|
Name = @"Banana Shower Count",
|
||||||
Content = bananaShowers.ToString(),
|
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 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);
|
protected override PassThroughInputManager CreateInputManager() => new CatchInputManager(Ruleset.RulesetInfo);
|
||||||
|
|
||||||
|
@ -42,13 +42,13 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
|||||||
{
|
{
|
||||||
Name = @"Note Count",
|
Name = @"Note Count",
|
||||||
Content = notes.ToString(),
|
Content = notes.ToString(),
|
||||||
Icon = FontAwesome.CircleOutline
|
Icon = FontAwesome.Regular.Circle
|
||||||
},
|
},
|
||||||
new BeatmapStatistic
|
new BeatmapStatistic
|
||||||
{
|
{
|
||||||
Name = @"Hold Note Count",
|
Name = @"Hold Note Count",
|
||||||
Content = holdnotes.ToString(),
|
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>
|
/// <returns>The column which intersects with <paramref name="screenSpacePosition"/>.</returns>
|
||||||
public Column GetColumnByPosition(Vector2 screenSpacePosition) => Playfield.GetColumnByPosition(screenSpacePosition);
|
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);
|
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",
|
Name = @"Circle Count",
|
||||||
Content = circles.ToString(),
|
Content = circles.ToString(),
|
||||||
Icon = FontAwesome.CircleOutline
|
Icon = FontAwesome.Regular.Circle
|
||||||
},
|
},
|
||||||
new BeatmapStatistic
|
new BeatmapStatistic
|
||||||
{
|
{
|
||||||
Name = @"Slider Count",
|
Name = @"Slider Count",
|
||||||
Content = sliders.ToString(),
|
Content = sliders.ToString(),
|
||||||
Icon = FontAwesome.Circle
|
Icon = FontAwesome.Regular.Circle
|
||||||
},
|
},
|
||||||
new BeatmapStatistic
|
new BeatmapStatistic
|
||||||
{
|
{
|
||||||
Name = @"Spinner Count",
|
Name = @"Spinner Count",
|
||||||
Content = spinners.ToString(),
|
Content = spinners.ToString(),
|
||||||
Icon = FontAwesome.Circle
|
Icon = FontAwesome.Regular.Circle
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -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
|
private class OsuPlayfieldNoCursor : OsuPlayfield
|
||||||
{
|
{
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Edit;
|
using osu.Game.Rulesets.Edit;
|
||||||
using osu.Game.Rulesets.Edit.Tools;
|
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.Edit.Blueprints.Spinners;
|
||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.UI;
|
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osu.Game.Screens.Edit.Compose.Components;
|
using osu.Game.Screens.Edit.Compose.Components;
|
||||||
|
|
||||||
@ -38,8 +35,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
public override SelectionHandler CreateSelectionHandler() => new OsuSelectionHandler();
|
public override SelectionHandler CreateSelectionHandler() => new OsuSelectionHandler();
|
||||||
|
|
||||||
protected override Container CreateLayerContainer() => new OsuPlayfieldAdjustmentContainer { RelativeSizeAxes = Axes.Both };
|
|
||||||
|
|
||||||
public override SelectionBlueprint CreateBlueprintFor(DrawableHitObject hitObject)
|
public override SelectionBlueprint CreateBlueprintFor(DrawableHitObject hitObject)
|
||||||
{
|
{
|
||||||
switch (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 Description => "Play with blinds on your screen.";
|
||||||
public override string Acronym => "BL";
|
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 ModType Type => ModType.DifficultyIncrease;
|
||||||
|
|
||||||
public override bool Ranked => false;
|
public override bool Ranked => false;
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public override string Acronym => "GR";
|
public override string Acronym => "GR";
|
||||||
|
|
||||||
public override IconUsage Icon => FontAwesome.ArrowsV;
|
public override IconUsage Icon => FontAwesome.Solid.ArrowsAltV;
|
||||||
|
|
||||||
public override ModType Type => ModType.Fun;
|
public override ModType Type => ModType.Fun;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
{
|
{
|
||||||
public override string Name => "Transform";
|
public override string Name => "Transform";
|
||||||
public override string Acronym => "TR";
|
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 ModType Type => ModType.Fun;
|
||||||
public override string Description => "Everything rotates. EVERYTHING.";
|
public override string Description => "Everything rotates. EVERYTHING.";
|
||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
{
|
{
|
||||||
public override string Name => "Wiggle";
|
public override string Name => "Wiggle";
|
||||||
public override string Acronym => "WG";
|
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 ModType Type => ModType.Fun;
|
||||||
public override string Description => "They just won't stay still...";
|
public override string Description => "They just won't stay still...";
|
||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
new SkinnableDrawable("Play/osu/reversearrow", _ => new SpriteIcon
|
new SkinnableDrawable("Play/osu/reversearrow", _ => new SpriteIcon
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Icon = FontAwesome.ChevronRight
|
Icon = FontAwesome.Solid.ChevronRight
|
||||||
}, restrictSize: false)
|
}, restrictSize: false)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(48),
|
Size = new Vector2(48),
|
||||||
Icon = FontAwesome.Asterisk,
|
Icon = FontAwesome.Solid.Asterisk,
|
||||||
Shadow = false,
|
Shadow = false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,6 @@ namespace osu.Game.Rulesets.Osu.Replays
|
|||||||
{
|
{
|
||||||
// We add intermediate frames for spinning / following a slider here.
|
// We add intermediate frames for spinning / following a slider here.
|
||||||
case Spinner spinner:
|
case Spinner spinner:
|
||||||
{
|
|
||||||
Vector2 difference = startPosition - SPINNER_CENTRE;
|
Vector2 difference = startPosition - SPINNER_CENTRE;
|
||||||
|
|
||||||
float radius = difference.Length;
|
float radius = difference.Length;
|
||||||
@ -315,9 +314,7 @@ namespace osu.Game.Rulesets.Osu.Replays
|
|||||||
|
|
||||||
endFrame.Position = endPosition;
|
endFrame.Position = endPosition;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case Slider slider:
|
case Slider slider:
|
||||||
{
|
|
||||||
for (double j = FrameDelay; j < slider.Duration; j += FrameDelay)
|
for (double j = FrameDelay; j < slider.Duration; j += FrameDelay)
|
||||||
{
|
{
|
||||||
Vector2 pos = slider.StackedPositionAt(j / slider.Duration);
|
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));
|
AddFrameToReplay(new OsuReplayFrame(slider.EndTime, new Vector2(slider.StackedEndPosition.X, slider.StackedEndPosition.Y), action));
|
||||||
break;
|
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!
|
// 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
|
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);
|
||||||
|
}
|
||||||
|
}
|
@ -1,18 +1,9 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// 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;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
|
||||||
using osu.Framework.Input.Bindings;
|
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.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.UI.Cursor
|
namespace osu.Game.Rulesets.Osu.UI.Cursor
|
||||||
@ -88,136 +79,5 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
fadeContainer.FadeTo(0.05f, 450, Easing.OutQuint);
|
fadeContainer.FadeTo(0.05f, 450, Easing.OutQuint);
|
||||||
ActiveCursor.ScaleTo(0.8f, 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.Osu.Scoring;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.UI
|
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 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)
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -23,19 +23,19 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
|
|||||||
{
|
{
|
||||||
Name = @"Hit Count",
|
Name = @"Hit Count",
|
||||||
Content = hits.ToString(),
|
Content = hits.ToString(),
|
||||||
Icon = FontAwesome.CircleOutline
|
Icon = FontAwesome.Regular.Circle
|
||||||
},
|
},
|
||||||
new BeatmapStatistic
|
new BeatmapStatistic
|
||||||
{
|
{
|
||||||
Name = @"Drumroll Count",
|
Name = @"Drumroll Count",
|
||||||
Content = drumrolls.ToString(),
|
Content = drumrolls.ToString(),
|
||||||
Icon = FontAwesome.Circle
|
Icon = FontAwesome.Regular.Circle
|
||||||
},
|
},
|
||||||
new BeatmapStatistic
|
new BeatmapStatistic
|
||||||
{
|
{
|
||||||
Name = @"Swell Count",
|
Name = @"Swell Count",
|
||||||
Content = swells.ToString(),
|
Content = swells.ToString(),
|
||||||
Icon = FontAwesome.Circle
|
Icon = FontAwesome.Regular.Circle
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
|
|||||||
new SpriteIcon
|
new SpriteIcon
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Icon = FontAwesome.Asterisk,
|
Icon = FontAwesome.Solid.Asterisk,
|
||||||
Shadow = false
|
Shadow = false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -81,7 +81,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
|
|
||||||
public override ScoreProcessor CreateScoreProcessor() => new TaikoScoreProcessor(this);
|
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);
|
protected override PassThroughInputManager CreateInputManager() => new TaikoInputManager(Ruleset.RulesetInfo);
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ namespace osu.Game.Tests.NonVisual
|
|||||||
|
|
||||||
protected override double AllowedImportantTimeSpan => 1000;
|
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.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.Cursor;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
using osuTK;
|
||||||
|
using osuTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Gameplay
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
@ -15,14 +21,52 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
{
|
{
|
||||||
protected new PausePlayer Player => (PausePlayer)base.Player;
|
protected new PausePlayer Player => (PausePlayer)base.Player;
|
||||||
|
|
||||||
|
private readonly Container content;
|
||||||
|
|
||||||
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
public TestCasePause()
|
public TestCasePause()
|
||||||
: base(new OsuRuleset())
|
: base(new OsuRuleset())
|
||||||
{
|
{
|
||||||
|
base.Content.Add(content = new MenuCursorContainer { RelativeSizeAxes = Axes.Both });
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestPauseResume()
|
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();
|
pauseAndConfirm();
|
||||||
resumeAndConfirm();
|
resumeAndConfirm();
|
||||||
}
|
}
|
||||||
@ -30,6 +74,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestPauseTooSoon()
|
public void TestPauseTooSoon()
|
||||||
{
|
{
|
||||||
|
AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10)));
|
||||||
|
|
||||||
pauseAndConfirm();
|
pauseAndConfirm();
|
||||||
resumeAndConfirm();
|
resumeAndConfirm();
|
||||||
|
|
||||||
@ -144,9 +190,16 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
|
|
||||||
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
|
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
|
||||||
|
|
||||||
|
public new HUDOverlay HUDOverlay => base.HUDOverlay;
|
||||||
|
|
||||||
public bool FailOverlayVisible => FailOverlay.State == Visibility.Visible;
|
public bool FailOverlayVisible => FailOverlay.State == Visibility.Visible;
|
||||||
|
|
||||||
public bool PauseOverlayVisible => PauseOverlay.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();
|
var overlay = new BeatmapOptionsOverlay();
|
||||||
|
|
||||||
overlay.AddButton(@"Remove", @"from unplayed", FontAwesome.TimesCircleOutline, Color4.Purple, null, Key.Number1);
|
overlay.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, Color4.Purple, null, Key.Number1);
|
||||||
overlay.AddButton(@"Clear", @"local scores", FontAwesome.Eraser, Color4.Purple, null, Key.Number2);
|
overlay.AddButton(@"Clear", @"local scores", FontAwesome.Solid.Eraser, Color4.Purple, null, Key.Number2);
|
||||||
overlay.AddButton(@"Edit", @"Beatmap", FontAwesome.Pencil, Color4.Yellow, null, Key.Number3);
|
overlay.AddButton(@"Edit", @"Beatmap", FontAwesome.Solid.PencilAlt, Color4.Yellow, null, Key.Number3);
|
||||||
overlay.AddButton(@"Delete", @"Beatmap", FontAwesome.Trash, Color4.Pink, null, Key.Number4, float.MaxValue);
|
overlay.AddButton(@"Delete", @"Beatmap", FontAwesome.Solid.Trash, Color4.Pink, null, Key.Number4, float.MaxValue);
|
||||||
|
|
||||||
Add(overlay);
|
Add(overlay);
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
AddStep("dialog #1", () => overlay.Push(new PopupDialog
|
AddStep("dialog #1", () => overlay.Push(new PopupDialog
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.TrashOutline,
|
Icon = FontAwesome.Regular.TrashAlt,
|
||||||
HeaderText = @"Confirm deletion of",
|
HeaderText = @"Confirm deletion of",
|
||||||
BodyText = @"Ayase Rie - Yuima-ru*World TVver.",
|
BodyText = @"Ayase Rie - Yuima-ru*World TVver.",
|
||||||
Buttons = new PopupDialogButton[]
|
Buttons = new PopupDialogButton[]
|
||||||
@ -39,7 +39,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
AddStep("dialog #2", () => overlay.Push(new PopupDialog
|
AddStep("dialog #2", () => overlay.Push(new PopupDialog
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Gear,
|
Icon = FontAwesome.Solid.Cog,
|
||||||
HeaderText = @"What do you want to do with",
|
HeaderText = @"What do you want to do with",
|
||||||
BodyText = "Camellia as \"Bang Riot\" - Blastix Riotz",
|
BodyText = "Camellia as \"Bang Riot\" - Blastix Riotz",
|
||||||
Buttons = new PopupDialogButton[]
|
Buttons = new PopupDialogButton[]
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
State = Framework.Graphics.Containers.Visibility.Visible,
|
State = Framework.Graphics.Containers.Visibility.Visible,
|
||||||
Icon = FontAwesome.AssistiveListeningSystems,
|
Icon = FontAwesome.Solid.AssistiveListeningSystems,
|
||||||
HeaderText = @"This is a test popup",
|
HeaderText = @"This is a test popup",
|
||||||
BodyText = "I can say lots of stuff and even wrap my words!",
|
BodyText = "I can say lots of stuff and even wrap my words!",
|
||||||
Buttons = new PopupDialogButton[]
|
Buttons = new PopupDialogButton[]
|
||||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.Both,
|
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)
|
// 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
|
// Input
|
||||||
Set(OsuSetting.MenuCursorSize, 1.0, 0.5f, 2, 0.01);
|
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.AutoCursorSize, false);
|
||||||
|
|
||||||
Set(OsuSetting.MouseDisableButtons, false);
|
Set(OsuSetting.MouseDisableButtons, false);
|
||||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
showNotImplementedError = () => notifications?.Post(new SimpleNotification
|
showNotImplementedError = () => notifications?.Post(new SimpleNotification
|
||||||
{
|
{
|
||||||
Text = @"This link type is not yet supported!",
|
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:
|
case Typeface.Exo:
|
||||||
return "Exo2.0";
|
return "Exo2.0";
|
||||||
case Typeface.FontAwesome:
|
|
||||||
return "FontAwesome";
|
|
||||||
case Typeface.Venera:
|
case Typeface.Venera:
|
||||||
return "Venera";
|
return "Venera";
|
||||||
}
|
}
|
||||||
@ -101,7 +99,6 @@ namespace osu.Game.Graphics
|
|||||||
public enum Typeface
|
public enum Typeface
|
||||||
{
|
{
|
||||||
Exo,
|
Exo,
|
||||||
FontAwesome,
|
|
||||||
Venera,
|
Venera,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Graphics
|
|||||||
{
|
{
|
||||||
public static class OsuIcon
|
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
|
// ruleset icons in circles
|
||||||
public static IconUsage RulesetOsu => Get(0xe000);
|
public static IconUsage RulesetOsu => Get(0xe000);
|
||||||
|
@ -93,7 +93,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Size = new Vector2(item_chevron_size),
|
Size = new Vector2(item_chevron_size),
|
||||||
Icon = FontAwesome.ChevronRight,
|
Icon = FontAwesome.Solid.ChevronRight,
|
||||||
Margin = new MarginPadding { Left = padding },
|
Margin = new MarginPadding { Left = padding },
|
||||||
Alpha = 0f,
|
Alpha = 0f,
|
||||||
});
|
});
|
||||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Size = new Vector2(12);
|
Size = new Vector2(12);
|
||||||
InternalChild = new SpriteIcon
|
InternalChild = new SpriteIcon
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.ExternalLink,
|
Icon = FontAwesome.Solid.ExternalLinkAlt,
|
||||||
RelativeSizeAxes = Axes.Both
|
RelativeSizeAxes = Axes.Both
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -37,14 +37,14 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Position = new Vector2(1, 1),
|
Position = new Vector2(1, 1),
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Alpha = 0.4f,
|
Alpha = 0.4f,
|
||||||
Icon = FontAwesome.CircleONotch
|
Icon = FontAwesome.Solid.CircleNotch
|
||||||
},
|
},
|
||||||
spinner = new SpriteIcon
|
spinner = new SpriteIcon
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Icon = FontAwesome.CircleONotch
|
Icon = FontAwesome.Solid.CircleNotch
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Chevron = new SpriteIcon
|
Chevron = new SpriteIcon
|
||||||
{
|
{
|
||||||
AlwaysPresent = true,
|
AlwaysPresent = true,
|
||||||
Icon = FontAwesome.ChevronRight,
|
Icon = FontAwesome.Solid.ChevronRight,
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Alpha = 0.5f,
|
Alpha = 0.5f,
|
||||||
Size = new Vector2(8),
|
Size = new Vector2(8),
|
||||||
@ -244,7 +244,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
},
|
},
|
||||||
Icon = new SpriteIcon
|
Icon = new SpriteIcon
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.ChevronDown,
|
Icon = FontAwesome.Solid.ChevronDown,
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Margin = new MarginPadding { Right = 4 },
|
Margin = new MarginPadding { Right = 4 },
|
||||||
|
@ -108,7 +108,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
public CapsWarning()
|
public CapsWarning()
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Warning;
|
Icon = FontAwesome.Solid.ExclamationTriangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -254,7 +254,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
new SpriteIcon
|
new SpriteIcon
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.EllipsisH,
|
Icon = FontAwesome.Solid.EllipsisH,
|
||||||
Size = new Vector2(14),
|
Size = new Vector2(14),
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
|
@ -99,7 +99,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
icon = new SpriteIcon
|
icon = new SpriteIcon
|
||||||
{
|
{
|
||||||
Size = new Vector2(14),
|
Size = new Vector2(14),
|
||||||
Icon = FontAwesome.CircleOutline,
|
Icon = FontAwesome.Regular.Circle,
|
||||||
Shadow = true,
|
Shadow = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -120,12 +120,12 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
if (selected.NewValue)
|
if (selected.NewValue)
|
||||||
{
|
{
|
||||||
fadeIn();
|
fadeIn();
|
||||||
icon.Icon = FontAwesome.CheckCircleOutline;
|
icon.Icon = FontAwesome.Regular.CheckCircle;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fadeOut();
|
fadeOut();
|
||||||
icon.Icon = FontAwesome.CircleOutline;
|
icon.Icon = FontAwesome.Regular.Circle;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
new SpriteIcon
|
new SpriteIcon
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Search,
|
Icon = FontAwesome.Solid.Search,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Margin = new MarginPadding { Right = 10 },
|
Margin = new MarginPadding { Right = 10 },
|
||||||
|
@ -143,7 +143,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Child = Icon = new SpriteIcon
|
Child = Icon = new SpriteIcon
|
||||||
{
|
{
|
||||||
Size = new Vector2(star_size),
|
Size = new Vector2(star_size),
|
||||||
Icon = FontAwesome.Star,
|
Icon = FontAwesome.Solid.Star,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
};
|
};
|
||||||
|
@ -258,8 +258,8 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
|
|
||||||
protected virtual IEnumerable<LeaderboardScoreStatistic> GetStatistics(ScoreInfo model) => new[]
|
protected virtual IEnumerable<LeaderboardScoreStatistic> GetStatistics(ScoreInfo model) => new[]
|
||||||
{
|
{
|
||||||
new LeaderboardScoreStatistic(FontAwesome.Link, "Max Combo", model.MaxCombo.ToString()),
|
new LeaderboardScoreStatistic(FontAwesome.Solid.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.Crosshairs, "Accuracy", string.Format(model.Accuracy % 1 == 0 ? @"{0:P0}" : @"{0:P2}", model.Accuracy))
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
protected override bool OnHover(HoverEvent e)
|
||||||
@ -353,7 +353,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
Size = new Vector2(icon_size),
|
Size = new Vector2(icon_size),
|
||||||
Rotation = 45,
|
Rotation = 45,
|
||||||
Colour = OsuColour.FromHex(@"3087ac"),
|
Colour = OsuColour.FromHex(@"3087ac"),
|
||||||
Icon = FontAwesome.Square,
|
Icon = FontAwesome.Solid.Square,
|
||||||
Shadow = true,
|
Shadow = true,
|
||||||
},
|
},
|
||||||
new SpriteIcon
|
new SpriteIcon
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
|
|
||||||
public MessagePlaceholder(string message)
|
public MessagePlaceholder(string message)
|
||||||
{
|
{
|
||||||
AddIcon(FontAwesome.ExclamationCircle, cp =>
|
AddIcon(FontAwesome.Solid.ExclamationCircle, cp =>
|
||||||
{
|
{
|
||||||
cp.Font = cp.Font.With(size: TEXT_SIZE);
|
cp.Font = cp.Font.With(size: TEXT_SIZE);
|
||||||
cp.Padding = new MarginPadding { Right = 10 };
|
cp.Padding = new MarginPadding { Right = 10 };
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
Action = () => Action?.Invoke(),
|
Action = () => Action?.Invoke(),
|
||||||
Child = icon = new SpriteIcon
|
Child = icon = new SpriteIcon
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Refresh,
|
Icon = FontAwesome.Solid.Sync,
|
||||||
Size = new Vector2(TEXT_SIZE),
|
Size = new Vector2(TEXT_SIZE),
|
||||||
Shadow = true,
|
Shadow = true,
|
||||||
},
|
},
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Online.Multiplayer.GameTypes
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Icon = FontAwesome.Refresh,
|
Icon = FontAwesome.Solid.Sync,
|
||||||
Size = new Vector2(size),
|
Size = new Vector2(size),
|
||||||
Colour = colours.Blue,
|
Colour = colours.Blue,
|
||||||
Shadow = false,
|
Shadow = false,
|
||||||
|
@ -26,14 +26,14 @@ namespace osu.Game.Online.Multiplayer.GameTypes
|
|||||||
{
|
{
|
||||||
new SpriteIcon
|
new SpriteIcon
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Refresh,
|
Icon = FontAwesome.Solid.Sync,
|
||||||
Size = new Vector2(size * 0.75f),
|
Size = new Vector2(size * 0.75f),
|
||||||
Colour = colours.Blue,
|
Colour = colours.Blue,
|
||||||
Shadow = false,
|
Shadow = false,
|
||||||
},
|
},
|
||||||
new SpriteIcon
|
new SpriteIcon
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Refresh,
|
Icon = FontAwesome.Solid.Sync,
|
||||||
Size = new Vector2(size * 0.75f),
|
Size = new Vector2(size * 0.75f),
|
||||||
Colour = colours.Pink,
|
Colour = colours.Pink,
|
||||||
Shadow = false,
|
Shadow = false,
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Online.Multiplayer.GameTypes
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Icon = FontAwesome.ClockOutline,
|
Icon = FontAwesome.Regular.Clock,
|
||||||
Size = new Vector2(size),
|
Size = new Vector2(size),
|
||||||
Colour = colours.Blue,
|
Colour = colours.Blue,
|
||||||
Shadow = false
|
Shadow = false
|
||||||
|
@ -580,7 +580,7 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
Schedule(() => notifications.Post(new SimpleNotification
|
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),
|
Text = entry.Message + (entry.Exception != null && IsDeployedBuild ? "\n\nThis error has been automatically reported to the devs." : string.Empty),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -588,7 +588,7 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
Schedule(() => notifications.Post(new SimpleNotification
|
Schedule(() => notifications.Post(new SimpleNotification
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.EllipsisH,
|
Icon = FontAwesome.Solid.EllipsisH,
|
||||||
Text = "Subsequent messages have been logged. Click to view log files.",
|
Text = "Subsequent messages have been logged. Click to view log files.",
|
||||||
Activated = () =>
|
Activated = () =>
|
||||||
{
|
{
|
||||||
|
@ -75,10 +75,10 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
length = new Statistic(FontAwesome.ClockOutline, "Length") { Width = 0.25f },
|
length = new Statistic(FontAwesome.Regular.Clock, "Length") { Width = 0.25f },
|
||||||
bpm = new Statistic(FontAwesome.Circle, "BPM") { Width = 0.25f },
|
bpm = new Statistic(FontAwesome.Regular.Circle, "BPM") { Width = 0.25f },
|
||||||
circleCount = new Statistic(FontAwesome.CircleOutline, "Circle Count") { Width = 0.25f },
|
circleCount = new Statistic(FontAwesome.Regular.Circle, "Circle Count") { Width = 0.25f },
|
||||||
sliderCount = new Statistic(FontAwesome.Circle, "Slider 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,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Icon = FontAwesome.Square,
|
Icon = FontAwesome.Solid.Square,
|
||||||
Size = new Vector2(13),
|
Size = new Vector2(13),
|
||||||
Rotation = 45,
|
Rotation = 45,
|
||||||
Colour = OsuColour.FromHex(@"441288"),
|
Colour = OsuColour.FromHex(@"441288"),
|
||||||
|
@ -131,8 +131,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
Margin = new MarginPadding { Top = 5 },
|
Margin = new MarginPadding { Top = 5 },
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
plays = new Statistic(FontAwesome.PlayCircle),
|
plays = new Statistic(FontAwesome.Solid.PlayCircle),
|
||||||
favourites = new Statistic(FontAwesome.Heart),
|
favourites = new Statistic(FontAwesome.Solid.Heart),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
|||||||
Depth = -1,
|
Depth = -1,
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Icon = FontAwesome.Download,
|
Icon = FontAwesome.Solid.Download,
|
||||||
Size = new Vector2(16),
|
Size = new Vector2(16),
|
||||||
Margin = new MarginPadding { Right = 5 },
|
Margin = new MarginPadding { Right = 5 },
|
||||||
},
|
},
|
||||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Icon = FontAwesome.HeartOutline,
|
Icon = FontAwesome.Regular.Heart,
|
||||||
Size = new Vector2(18),
|
Size = new Vector2(18),
|
||||||
Shadow = false,
|
Shadow = false,
|
||||||
},
|
},
|
||||||
@ -59,12 +59,12 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
|||||||
if (favourited.NewValue)
|
if (favourited.NewValue)
|
||||||
{
|
{
|
||||||
pink.FadeIn(200);
|
pink.FadeIn(200);
|
||||||
icon.Icon = FontAwesome.Heart;
|
icon.Icon = FontAwesome.Solid.Heart;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pink.FadeOut(200);
|
pink.FadeOut(200);
|
||||||
icon.Icon = FontAwesome.HeartOutline;
|
icon.Icon = FontAwesome.Regular.Heart;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
HeaderText = "Just checking...";
|
HeaderText = "Just checking...";
|
||||||
BodyText = $"You are about to leave osu! and open the following link in a web browser:\n\n{url}";
|
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[]
|
Buttons = new PopupDialogButton[]
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
Icon = FontAwesome.CheckCircle,
|
Icon = FontAwesome.Solid.CheckCircle,
|
||||||
Size = new Vector2(text_size),
|
Size = new Vector2(text_size),
|
||||||
Shadow = false,
|
Shadow = false,
|
||||||
Margin = new MarginPadding { Right = 10f },
|
Margin = new MarginPadding { Right = 10f },
|
||||||
@ -121,7 +121,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
|||||||
{
|
{
|
||||||
new SpriteIcon
|
new SpriteIcon
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.User,
|
Icon = FontAwesome.Solid.User,
|
||||||
Size = new Vector2(text_size - 2),
|
Size = new Vector2(text_size - 2),
|
||||||
Shadow = false,
|
Shadow = false,
|
||||||
Margin = new MarginPadding { Top = 1 },
|
Margin = new MarginPadding { Top = 1 },
|
||||||
|
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
|
|
||||||
AddInternal(new SpriteIcon
|
AddInternal(new SpriteIcon
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Comments,
|
Icon = FontAwesome.Solid.Comments,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Size = new Vector2(20),
|
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;
|
protected virtual bool ShowCloseOnHover => true;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
private readonly OsuSpriteText username;
|
private readonly OsuSpriteText username;
|
||||||
private readonly Avatar avatarContainer;
|
private readonly Avatar avatarContainer;
|
||||||
|
|
||||||
protected override IconUsage DisplayIcon => FontAwesome.At;
|
protected override IconUsage DisplayIcon => FontAwesome.Solid.At;
|
||||||
|
|
||||||
public PrivateChannelTabItem(Channel value)
|
public PrivateChannelTabItem(Channel value)
|
||||||
: base(value)
|
: base(value)
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Scale = new Vector2(0.75f),
|
Scale = new Vector2(0.75f),
|
||||||
Icon = FontAwesome.Close,
|
Icon = FontAwesome.Solid.TimesCircle,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Icon = FontAwesome.Close,
|
Icon = FontAwesome.Solid.TimesCircle,
|
||||||
Size = new Vector2(50),
|
Size = new Vector2(50),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -186,8 +186,8 @@ namespace osu.Game.Overlays.Direct
|
|||||||
Margin = new MarginPadding { Top = vertical_padding, Right = vertical_padding },
|
Margin = new MarginPadding { Top = vertical_padding, Right = vertical_padding },
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new Statistic(FontAwesome.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0),
|
new Statistic(FontAwesome.Solid.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0),
|
||||||
new Statistic(FontAwesome.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
new Statistic(FontAwesome.Solid.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
statusContainer = new FillFlowContainer
|
statusContainer = new FillFlowContainer
|
||||||
@ -206,12 +206,12 @@ namespace osu.Game.Overlays.Direct
|
|||||||
|
|
||||||
if (SetInfo.OnlineInfo?.HasVideo ?? false)
|
if (SetInfo.OnlineInfo?.HasVideo ?? false)
|
||||||
{
|
{
|
||||||
statusContainer.Add(new IconPill(FontAwesome.Film));
|
statusContainer.Add(new IconPill(FontAwesome.Solid.Film));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SetInfo.OnlineInfo?.HasStoryboard ?? false)
|
if (SetInfo.OnlineInfo?.HasStoryboard ?? false)
|
||||||
{
|
{
|
||||||
statusContainer.Add(new IconPill(FontAwesome.Image));
|
statusContainer.Add(new IconPill(FontAwesome.Solid.Image));
|
||||||
}
|
}
|
||||||
|
|
||||||
statusContainer.Add(new BeatmapSetOnlineStatusPill
|
statusContainer.Add(new BeatmapSetOnlineStatusPill
|
||||||
|
@ -161,8 +161,8 @@ namespace osu.Game.Overlays.Direct
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Statistic(FontAwesome.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0),
|
new Statistic(FontAwesome.Solid.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0),
|
||||||
new Statistic(FontAwesome.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
new Statistic(FontAwesome.Solid.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
@ -211,12 +211,12 @@ namespace osu.Game.Overlays.Direct
|
|||||||
|
|
||||||
if (SetInfo.OnlineInfo?.HasVideo ?? false)
|
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)
|
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
|
statusContainer.Add(new BeatmapSetOnlineStatusPill
|
||||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(13),
|
Size = new Vector2(13),
|
||||||
Icon = FontAwesome.Download,
|
Icon = FontAwesome.Solid.Download,
|
||||||
},
|
},
|
||||||
checkmark = new SpriteIcon
|
checkmark = new SpriteIcon
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
X = 8,
|
X = 8,
|
||||||
Size = Vector2.Zero,
|
Size = Vector2.Zero,
|
||||||
Icon = FontAwesome.Check,
|
Icon = FontAwesome.Solid.Check,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
FillMode = FillMode.Fit,
|
FillMode = FillMode.Fit,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Icon = FontAwesome.Play,
|
Icon = FontAwesome.Solid.Play,
|
||||||
},
|
},
|
||||||
loadingAnimation = new LoadingAnimation
|
loadingAnimation = new LoadingAnimation
|
||||||
{
|
{
|
||||||
@ -116,7 +116,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
|
|
||||||
private void playingStateChanged(ValueChangedEvent<bool> e)
|
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);
|
icon.FadeColour(e.NewValue || IsHovered ? hoverColour : Color4.White, 120, Easing.InOutQuint);
|
||||||
|
|
||||||
if (e.NewValue)
|
if (e.NewValue)
|
||||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
{
|
{
|
||||||
public class GlobalKeyBindingsSection : SettingsSection
|
public class GlobalKeyBindingsSection : SettingsSection
|
||||||
{
|
{
|
||||||
public override IconUsage Icon => FontAwesome.Globe;
|
public override IconUsage Icon => FontAwesome.Solid.Globe;
|
||||||
public override string Header => "Global";
|
public override string Header => "Global";
|
||||||
|
|
||||||
public GlobalKeyBindingsSection(GlobalActionContainer manager)
|
public GlobalKeyBindingsSection(GlobalActionContainer manager)
|
||||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Overlays
|
|||||||
Y = -15,
|
Y = -15,
|
||||||
Size = new Vector2(15),
|
Size = new Vector2(15),
|
||||||
Shadow = true,
|
Shadow = true,
|
||||||
Icon = FontAwesome.ChevronLeft
|
Icon = FontAwesome.Solid.ChevronLeft
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
|
@ -164,7 +164,7 @@ namespace osu.Game.Overlays.Music
|
|||||||
Anchor = Anchor.TopLeft;
|
Anchor = Anchor.TopLeft;
|
||||||
Origin = Anchor.TopLeft;
|
Origin = Anchor.TopLeft;
|
||||||
Size = new Vector2(12);
|
Size = new Vector2(12);
|
||||||
Icon = FontAwesome.Bars;
|
Icon = FontAwesome.Solid.Bars;
|
||||||
Alpha = 0f;
|
Alpha = 0f;
|
||||||
Margin = new MarginPadding { Left = 5, Top = 2 };
|
Margin = new MarginPadding { Left = 5, Top = 2 };
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ namespace osu.Game.Overlays
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Action = prev,
|
Action = prev,
|
||||||
Icon = FontAwesome.StepBackward,
|
Icon = FontAwesome.Solid.StepBackward,
|
||||||
},
|
},
|
||||||
playButton = new MusicIconButton
|
playButton = new MusicIconButton
|
||||||
{
|
{
|
||||||
@ -157,14 +157,14 @@ namespace osu.Game.Overlays
|
|||||||
Scale = new Vector2(1.4f),
|
Scale = new Vector2(1.4f),
|
||||||
IconScale = new Vector2(1.4f),
|
IconScale = new Vector2(1.4f),
|
||||||
Action = play,
|
Action = play,
|
||||||
Icon = FontAwesome.PlayCircleOutline,
|
Icon = FontAwesome.Regular.PlayCircle,
|
||||||
},
|
},
|
||||||
nextButton = new MusicIconButton
|
nextButton = new MusicIconButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Action = () => next(),
|
Action = () => next(),
|
||||||
Icon = FontAwesome.StepForward,
|
Icon = FontAwesome.Solid.StepForward,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -173,7 +173,7 @@ namespace osu.Game.Overlays
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Position = new Vector2(-bottom_black_area_height / 2, 0),
|
Position = new Vector2(-bottom_black_area_height / 2, 0),
|
||||||
Icon = FontAwesome.Bars,
|
Icon = FontAwesome.Solid.Bars,
|
||||||
Action = () => playlist.ToggleVisibility(),
|
Action = () => playlist.ToggleVisibility(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -264,13 +264,13 @@ namespace osu.Game.Overlays
|
|||||||
progressBar.EndTime = track.Length;
|
progressBar.EndTime = track.Length;
|
||||||
progressBar.CurrentTime = track.CurrentTime;
|
progressBar.CurrentTime = track.CurrentTime;
|
||||||
|
|
||||||
playButton.Icon = track.IsRunning ? FontAwesome.PauseCircleOutline : FontAwesome.PlayCircleOutline;
|
playButton.Icon = track.IsRunning ? FontAwesome.Regular.PauseCircle : FontAwesome.Regular.PlayCircle;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
progressBar.CurrentTime = 0;
|
progressBar.CurrentTime = 0;
|
||||||
progressBar.EndTime = 1;
|
progressBar.EndTime = 1;
|
||||||
playButton.Icon = FontAwesome.PlayCircleOutline;
|
playButton.Icon = FontAwesome.Regular.PlayCircle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Icon = FontAwesome.TimesCircle,
|
Icon = FontAwesome.Solid.TimesCircle,
|
||||||
Size = new Vector2(20),
|
Size = new Vector2(20),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
{
|
{
|
||||||
public ProgressCompletionNotification()
|
public ProgressCompletionNotification()
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Check;
|
Icon = FontAwesome.Solid.Check;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IconUsage icon = FontAwesome.InfoCircle;
|
private IconUsage icon = FontAwesome.Solid.InfoCircle;
|
||||||
|
|
||||||
public IconUsage Icon
|
public IconUsage Icon
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Icon = FontAwesome.Heart,
|
Icon = FontAwesome.Solid.Heart,
|
||||||
Scale = new Vector2(0.45f),
|
Scale = new Vector2(0.45f),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -415,16 +415,16 @@ namespace osu.Game.Overlays.Profile
|
|||||||
websiteWithoutProtcol = websiteWithoutProtcol.Substring(protocolIndex + 2);
|
websiteWithoutProtcol = websiteWithoutProtcol.Substring(protocolIndex + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
tryAddInfoRightLine(FontAwesome.MapMarker, user.Location);
|
tryAddInfoRightLine(FontAwesome.Solid.MapMarker, user.Location);
|
||||||
tryAddInfoRightLine(FontAwesome.HeartOutline, user.Interests);
|
tryAddInfoRightLine(FontAwesome.Regular.Heart, user.Interests);
|
||||||
tryAddInfoRightLine(FontAwesome.Suitcase, user.Occupation);
|
tryAddInfoRightLine(FontAwesome.Solid.Suitcase, user.Occupation);
|
||||||
infoTextRight.NewParagraph();
|
infoTextRight.NewParagraph();
|
||||||
if (!string.IsNullOrEmpty(user.Twitter))
|
if (!string.IsNullOrEmpty(user.Twitter))
|
||||||
tryAddInfoRightLine(FontAwesome.Twitter, "@" + user.Twitter, $@"https://twitter.com/{user.Twitter}");
|
tryAddInfoRightLine(FontAwesome.Brands.Twitter, "@" + user.Twitter, $@"https://twitter.com/{user.Twitter}");
|
||||||
tryAddInfoRightLine(FontAwesome.Gamepad, user.Discord);
|
tryAddInfoRightLine(FontAwesome.Solid.Gamepad, user.Discord);
|
||||||
tryAddInfoRightLine(FontAwesome.Skype, user.Skype, @"skype:" + user.Skype + @"?chat");
|
tryAddInfoRightLine(FontAwesome.Brands.Skype, user.Skype, @"skype:" + user.Skype + @"?chat");
|
||||||
tryAddInfoRightLine(FontAwesome.Lastfm, user.Lastfm, $@"https://last.fm/users/{user.Lastfm}");
|
tryAddInfoRightLine(FontAwesome.Brands.Lastfm, user.Lastfm, $@"https://last.fm/users/{user.Lastfm}");
|
||||||
tryAddInfoRightLine(FontAwesome.Globe, websiteWithoutProtcol, user.Website);
|
tryAddInfoRightLine(FontAwesome.Solid.Globe, websiteWithoutProtcol, user.Website);
|
||||||
|
|
||||||
if (user.Statistics != null)
|
if (user.Statistics != null)
|
||||||
{
|
{
|
||||||
|
@ -37,8 +37,8 @@ namespace osu.Game.Overlays.SearchableList
|
|||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new DisplayStyleToggleButton(FontAwesome.ThLarge, PanelDisplayStyle.Grid, DisplayStyle),
|
new DisplayStyleToggleButton(FontAwesome.Solid.ThLarge, PanelDisplayStyle.Grid, DisplayStyle),
|
||||||
new DisplayStyleToggleButton(FontAwesome.ListUl, PanelDisplayStyle.List, DisplayStyle),
|
new DisplayStyleToggleButton(FontAwesome.Solid.ListUl, PanelDisplayStyle.List, DisplayStyle),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Dropdown = new SlimEnumDropdown<T>
|
Dropdown = new SlimEnumDropdown<T>
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
public class AudioSection : SettingsSection
|
public class AudioSection : SettingsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Audio";
|
public override string Header => "Audio";
|
||||||
public override IconUsage Icon => FontAwesome.VolumeUp;
|
public override IconUsage Icon => FontAwesome.Solid.VolumeUp;
|
||||||
|
|
||||||
public AudioSection()
|
public AudioSection()
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
public class DebugSection : SettingsSection
|
public class DebugSection : SettingsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Debug";
|
public override string Header => "Debug";
|
||||||
public override IconUsage Icon => FontAwesome.Bug;
|
public override IconUsage Icon => FontAwesome.Solid.Bug;
|
||||||
|
|
||||||
public DebugSection()
|
public DebugSection()
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
public class GameplaySection : SettingsSection
|
public class GameplaySection : SettingsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Gameplay";
|
public override string Header => "Gameplay";
|
||||||
public override IconUsage Icon => FontAwesome.CircleOutline;
|
public override IconUsage Icon => FontAwesome.Regular.Circle;
|
||||||
|
|
||||||
public GameplaySection()
|
public GameplaySection()
|
||||||
{
|
{
|
||||||
|
@ -363,7 +363,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Icon = FontAwesome.CircleOutline,
|
Icon = FontAwesome.Regular.Circle,
|
||||||
Size = new Vector2(14),
|
Size = new Vector2(14),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
public class GeneralSection : SettingsSection
|
public class GeneralSection : SettingsSection
|
||||||
{
|
{
|
||||||
public override string Header => "General";
|
public override string Header => "General";
|
||||||
public override IconUsage Icon => FontAwesome.Gear;
|
public override IconUsage Icon => FontAwesome.Solid.Cog;
|
||||||
|
|
||||||
public GeneralSection()
|
public GeneralSection()
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
public class GraphicsSection : SettingsSection
|
public class GraphicsSection : SettingsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Graphics";
|
public override string Header => "Graphics";
|
||||||
public override IconUsage Icon => FontAwesome.Laptop;
|
public override IconUsage Icon => FontAwesome.Solid.Laptop;
|
||||||
|
|
||||||
public GraphicsSection()
|
public GraphicsSection()
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
public class InputSection : SettingsSection
|
public class InputSection : SettingsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Input";
|
public override string Header => "Input";
|
||||||
public override IconUsage Icon => FontAwesome.KeyboardOutline;
|
public override IconUsage Icon => FontAwesome.Regular.Keyboard;
|
||||||
|
|
||||||
public InputSection(KeyBindingOverlay keyConfig)
|
public InputSection(KeyBindingOverlay keyConfig)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
BodyText = "Everything?";
|
BodyText = "Everything?";
|
||||||
|
|
||||||
Icon = FontAwesome.TrashOutline;
|
Icon = FontAwesome.Regular.TrashAlt;
|
||||||
HeaderText = @"Confirm deletion of";
|
HeaderText = @"Confirm deletion of";
|
||||||
Buttons = new PopupDialogButton[]
|
Buttons = new PopupDialogButton[]
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
public class MaintenanceSection : SettingsSection
|
public class MaintenanceSection : SettingsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Maintenance";
|
public override string Header => "Maintenance";
|
||||||
public override IconUsage Icon => FontAwesome.Wrench;
|
public override IconUsage Icon => FontAwesome.Solid.Wrench;
|
||||||
|
|
||||||
public MaintenanceSection()
|
public MaintenanceSection()
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
public class OnlineSection : SettingsSection
|
public class OnlineSection : SettingsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Online";
|
public override string Header => "Online";
|
||||||
public override IconUsage Icon => FontAwesome.Globe;
|
public override IconUsage Icon => FontAwesome.Solid.GlobeAsia;
|
||||||
|
|
||||||
public OnlineSection()
|
public OnlineSection()
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
|
|
||||||
public override string Header => "Skin";
|
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<SkinInfo> dropdownBindable = new Bindable<SkinInfo> { Default = SkinInfo.Default };
|
||||||
private readonly Bindable<int> configBindable = new Bindable<int>();
|
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 Color4 BackgroundColour => OsuColour.FromHex(@"38202e");
|
||||||
|
|
||||||
protected override SocialTab DefaultTab => SocialTab.AllPlayers;
|
protected override SocialTab DefaultTab => SocialTab.AllPlayers;
|
||||||
protected override IconUsage Icon => FontAwesome.Users;
|
protected override IconUsage Icon => FontAwesome.Solid.Users;
|
||||||
|
|
||||||
protected override Drawable CreateHeaderText()
|
protected override Drawable CreateHeaderText()
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
new ToolbarMusicButton(),
|
new ToolbarMusicButton(),
|
||||||
//new ToolbarButton
|
//new ToolbarButton
|
||||||
//{
|
//{
|
||||||
// Icon = FontAwesome.search
|
// Icon = FontAwesome.Solid.search
|
||||||
//},
|
//},
|
||||||
userButton = new ToolbarUserButton(),
|
userButton = new ToolbarUserButton(),
|
||||||
new ToolbarNotificationButton(),
|
new ToolbarNotificationButton(),
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
{
|
{
|
||||||
public ToolbarChatButton()
|
public ToolbarChatButton()
|
||||||
{
|
{
|
||||||
SetIcon(FontAwesome.Comments);
|
SetIcon(FontAwesome.Solid.Comments);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
{
|
{
|
||||||
public ToolbarHomeButton()
|
public ToolbarHomeButton()
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Home;
|
Icon = FontAwesome.Solid.Home;
|
||||||
TooltipMain = "Home";
|
TooltipMain = "Home";
|
||||||
TooltipSub = "Return to the main menu";
|
TooltipSub = "Return to the main menu";
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
{
|
{
|
||||||
public ToolbarMusicButton()
|
public ToolbarMusicButton()
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Music;
|
Icon = FontAwesome.Solid.Music;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
public ToolbarNotificationButton()
|
public ToolbarNotificationButton()
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Bars;
|
Icon = FontAwesome.Solid.Bars;
|
||||||
TooltipMain = "Notifications";
|
TooltipMain = "Notifications";
|
||||||
TooltipSub = "Waiting for 'ya";
|
TooltipSub = "Waiting for 'ya";
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
{
|
{
|
||||||
public ToolbarSettingsButton()
|
public ToolbarSettingsButton()
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Gear;
|
Icon = FontAwesome.Solid.Cog;
|
||||||
TooltipMain = "Settings";
|
TooltipMain = "Settings";
|
||||||
TooltipSub = "Change your settings";
|
TooltipSub = "Change your settings";
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
{
|
{
|
||||||
public ToolbarSocialButton()
|
public ToolbarSocialButton()
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Users;
|
Icon = FontAwesome.Solid.Users;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
|
@ -72,7 +72,7 @@ namespace osu.Game.Overlays.Volume
|
|||||||
|
|
||||||
Current.ValueChanged += muted =>
|
Current.ValueChanged += muted =>
|
||||||
{
|
{
|
||||||
icon.Icon = muted.NewValue ? FontAwesome.VolumeOff : FontAwesome.VolumeUp;
|
icon.Icon = muted.NewValue ? FontAwesome.Solid.VolumeOff : FontAwesome.Solid.VolumeUp;
|
||||||
icon.Margin = new MarginPadding { Left = muted.NewValue ? width / 2 - 15 : width / 2 - 10 }; //Magic numbers to line up both icons because they're different widths
|
icon.Margin = new MarginPadding { Left = muted.NewValue ? width / 2 - 15 : width / 2 - 10 }; //Magic numbers to line up both icons because they're different widths
|
||||||
};
|
};
|
||||||
Current.TriggerChange();
|
Current.TriggerChange();
|
||||||
|
@ -18,6 +18,8 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract Playfield Playfield { get; }
|
public abstract Playfield Playfield { get; }
|
||||||
|
|
||||||
|
public abstract PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer();
|
||||||
|
|
||||||
internal DrawableEditRuleset()
|
internal DrawableEditRuleset()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
@ -43,6 +45,8 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
{
|
{
|
||||||
public override Playfield Playfield => drawableRuleset.Playfield;
|
public override Playfield Playfield => drawableRuleset.Playfield;
|
||||||
|
|
||||||
|
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => drawableRuleset.CreatePlayfieldAdjustmentContainer();
|
||||||
|
|
||||||
private Ruleset ruleset => drawableRuleset.Ruleset;
|
private Ruleset ruleset => drawableRuleset.Ruleset;
|
||||||
private Beatmap<TObject> beatmap => drawableRuleset.Beatmap;
|
private Beatmap<TObject> beatmap => drawableRuleset.Beatmap;
|
||||||
|
|
||||||
|
@ -63,10 +63,10 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var layerBelowRuleset = CreateLayerContainer();
|
var layerBelowRuleset = DrawableRuleset.CreatePlayfieldAdjustmentContainer();
|
||||||
layerBelowRuleset.Child = new EditorPlayfieldBorder { RelativeSizeAxes = Axes.Both };
|
layerBelowRuleset.Child = new EditorPlayfieldBorder { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
var layerAboveRuleset = CreateLayerContainer();
|
var layerAboveRuleset = DrawableRuleset.CreatePlayfieldAdjustmentContainer();
|
||||||
layerAboveRuleset.Child = blueprintContainer = new BlueprintContainer();
|
layerAboveRuleset.Child = blueprintContainer = new BlueprintContainer();
|
||||||
|
|
||||||
layerContainers.Add(layerBelowRuleset);
|
layerContainers.Add(layerBelowRuleset);
|
||||||
@ -174,11 +174,6 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// Creates a <see cref="SelectionHandler"/> which outlines <see cref="DrawableHitObject"/>s and handles movement of selections.
|
/// Creates a <see cref="SelectionHandler"/> which outlines <see cref="DrawableHitObject"/>s and handles movement of selections.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual SelectionHandler CreateSelectionHandler() => new SelectionHandler();
|
public virtual SelectionHandler CreateSelectionHandler() => new SelectionHandler();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates a <see cref="ScalableContainer"/> which provides a layer above or below the <see cref="Playfield"/>.
|
|
||||||
/// </summary>
|
|
||||||
protected virtual Container CreateLayerContainer() => new Container { RelativeSizeAxes = Axes.Both };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class HitObjectComposer<TObject> : HitObjectComposer
|
public abstract class HitObjectComposer<TObject> : HitObjectComposer
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user