mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:42:58 +08:00
Merge branch 'add-new-colours' into HoutarouOreki-changelog-overlay
This commit is contained in:
commit
cc558cf073
@ -57,33 +57,20 @@ namespace osu.Game.Rulesets.Catch.Difficulty
|
||||
|
||||
CatchHitObject lastObject = null;
|
||||
|
||||
foreach (var hitObject in beatmap.HitObjects.OfType<CatchHitObject>())
|
||||
// In 2B beatmaps, it is possible that a normal Fruit is placed in the middle of a JuiceStream.
|
||||
foreach (var hitObject in beatmap.HitObjects
|
||||
.SelectMany(obj => obj is JuiceStream stream ? stream.NestedHitObjects : new[] { obj })
|
||||
.Cast<CatchHitObject>()
|
||||
.OrderBy(x => x.StartTime))
|
||||
{
|
||||
if (lastObject == null)
|
||||
{
|
||||
lastObject = hitObject;
|
||||
// We want to only consider fruits that contribute to the combo.
|
||||
if (hitObject is BananaShower || hitObject is TinyDroplet)
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (hitObject)
|
||||
{
|
||||
// We want to only consider fruits that contribute to the combo. Droplets are addressed as accuracy and spinners are not relevant for "skill" calculations.
|
||||
case Fruit fruit:
|
||||
yield return new CatchDifficultyHitObject(fruit, lastObject, clockRate, halfCatchWidth);
|
||||
if (lastObject != null)
|
||||
yield return new CatchDifficultyHitObject(hitObject, lastObject, clockRate, halfCatchWidth);
|
||||
|
||||
lastObject = hitObject;
|
||||
break;
|
||||
|
||||
case JuiceStream _:
|
||||
foreach (var nested in hitObject.NestedHitObjects.OfType<CatchHitObject>().Where(o => !(o is TinyDroplet)))
|
||||
{
|
||||
yield return new CatchDifficultyHitObject(nested, lastObject, clockRate, halfCatchWidth);
|
||||
|
||||
lastObject = nested;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
lastObject = hitObject;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
@ -48,7 +49,14 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||
{
|
||||
FlashlightPosition = e.MousePosition;
|
||||
const double follow_delay = 120;
|
||||
|
||||
var position = FlashlightPosition;
|
||||
var destination = e.MousePosition;
|
||||
|
||||
FlashlightPosition = Interpolation.ValueAt(
|
||||
MathHelper.Clamp(Clock.ElapsedFrameTime, 0, follow_delay), position, destination, 0, follow_delay, Easing.Out);
|
||||
|
||||
return base.OnMouseMove(e);
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10)));
|
||||
|
||||
pauseAndConfirm();
|
||||
resumeAndConfirm();
|
||||
|
||||
resume();
|
||||
pause();
|
||||
|
||||
confirmClockRunning(true);
|
||||
|
@ -1,16 +0,0 @@
|
||||
// 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.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public class TestCaseCharLookup : OsuTestCase
|
||||
{
|
||||
public TestCaseCharLookup()
|
||||
{
|
||||
AddStep("null", () => { });
|
||||
AddStep("display acharacter", () => Add(new OsuSpriteText { Text = "振込申請" }));
|
||||
}
|
||||
}
|
||||
}
|
@ -68,6 +68,48 @@ namespace osu.Game.Graphics
|
||||
public readonly Color4 GreenDark = FromHex(@"668800");
|
||||
public readonly Color4 GreenDarker = FromHex(@"445500");
|
||||
|
||||
public readonly Color4 Sky = FromHex(@"6bb5ff");
|
||||
public readonly Color4 GreySkyLighter = FromHex(@"c6e3f4");
|
||||
public readonly Color4 GreySkyLight = FromHex(@"8ab3cc");
|
||||
public readonly Color4 GreySky = FromHex(@"405461");
|
||||
public readonly Color4 GreySkyDark = FromHex(@"303d47");
|
||||
public readonly Color4 GreySkyDarker = FromHex(@"21272c");
|
||||
|
||||
public readonly Color4 Seafoam = FromHex(@"05ffa2");
|
||||
public readonly Color4 GreySeafoamLighter = FromHex(@"9ebab1");
|
||||
public readonly Color4 GreySeafoamLight = FromHex(@"4d7365");
|
||||
public readonly Color4 GreySeafoam = FromHex(@"33413c");
|
||||
public readonly Color4 GreySeafoamDark = FromHex(@"2c3532");
|
||||
public readonly Color4 GreySeafoamDarker = FromHex(@"1e2422");
|
||||
|
||||
public readonly Color4 Cyan = FromHex(@"05f4fd");
|
||||
public readonly Color4 GreyCyanLighter = FromHex(@"77b1b3");
|
||||
public readonly Color4 GreyCyanLight = FromHex(@"436d6f");
|
||||
public readonly Color4 GreyCyan = FromHex(@"293d3e");
|
||||
public readonly Color4 GreyCyanDark = FromHex(@"243536");
|
||||
public readonly Color4 GreyCyanDarker = FromHex(@"1e2929");
|
||||
|
||||
public readonly Color4 Lime = FromHex(@"82ff05");
|
||||
public readonly Color4 GreyLimeLighter = FromHex(@"deff87");
|
||||
public readonly Color4 GreyLimeLight = FromHex(@"657259");
|
||||
public readonly Color4 GreyLime = FromHex(@"3f443a");
|
||||
public readonly Color4 GreyLimeDark = FromHex(@"32352e");
|
||||
public readonly Color4 GreyLimeDarker = FromHex(@"2e302b");
|
||||
|
||||
public readonly Color4 Violet = FromHex(@"bf04ff");
|
||||
public readonly Color4 GreyVioletLighter = FromHex(@"ebb8fe");
|
||||
public readonly Color4 GreyVioletLight = FromHex(@"685370");
|
||||
public readonly Color4 GreyViolet = FromHex(@"46334d");
|
||||
public readonly Color4 GreyVioletDark = FromHex(@"2c2230");
|
||||
public readonly Color4 GreyVioletDarker = FromHex(@"201823");
|
||||
|
||||
public readonly Color4 Carmine = FromHex(@"ff0542");
|
||||
public readonly Color4 GreyCarmineLighter = FromHex(@"deaab4");
|
||||
public readonly Color4 GreyCarmineLight = FromHex(@"644f53");
|
||||
public readonly Color4 GreyCarmine = FromHex(@"342b2d");
|
||||
public readonly Color4 GreyCarmineDark = FromHex(@"302a2b");
|
||||
public readonly Color4 GreyCarmineDarker = FromHex(@"241d1e");
|
||||
|
||||
public readonly Color4 Gray0 = FromHex(@"000");
|
||||
public readonly Color4 Gray1 = FromHex(@"111");
|
||||
public readonly Color4 Gray2 = FromHex(@"222");
|
||||
|
@ -87,14 +87,6 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
|
||||
addSpacer(topLinkContainer);
|
||||
|
||||
if (user.PlayStyles?.Length > 0)
|
||||
{
|
||||
topLinkContainer.AddText("Plays with ");
|
||||
topLinkContainer.AddText(string.Join(", ", user.PlayStyles.Select(style => style.GetDescription())), embolden);
|
||||
|
||||
addSpacer(topLinkContainer);
|
||||
}
|
||||
|
||||
if (user.LastVisit.HasValue)
|
||||
{
|
||||
topLinkContainer.AddText("Last seen ");
|
||||
@ -103,6 +95,14 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
addSpacer(topLinkContainer);
|
||||
}
|
||||
|
||||
if (user.PlayStyles?.Length > 0)
|
||||
{
|
||||
topLinkContainer.AddText("Plays with ");
|
||||
topLinkContainer.AddText(string.Join(", ", user.PlayStyles.Select(style => style.GetDescription())), embolden);
|
||||
|
||||
addSpacer(topLinkContainer);
|
||||
}
|
||||
|
||||
topLinkContainer.AddText("Contributed ");
|
||||
topLinkContainer.AddLink($@"{user.PostCount:#,##0} forum posts", $"https://osu.ppy.sh/users/{user.Id}/posts", creationParameters: embolden);
|
||||
|
||||
|
@ -4,21 +4,20 @@
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Volume
|
||||
{
|
||||
public class MuteButton : Container, IHasCurrentValue<bool>
|
||||
public class MuteButton : OsuButton, IHasCurrentValue<bool>
|
||||
{
|
||||
private readonly Bindable<bool> current = new Bindable<bool>();
|
||||
|
||||
@ -36,63 +35,57 @@ namespace osu.Game.Overlays.Volume
|
||||
}
|
||||
|
||||
private Color4 hoveredColour, unhoveredColour;
|
||||
|
||||
private const float width = 100;
|
||||
public const float HEIGHT = 35;
|
||||
|
||||
public MuteButton()
|
||||
{
|
||||
Masking = true;
|
||||
BorderThickness = 3;
|
||||
CornerRadius = HEIGHT / 2;
|
||||
Content.BorderThickness = 3;
|
||||
Content.CornerRadius = HEIGHT / 2;
|
||||
|
||||
Size = new Vector2(width, HEIGHT);
|
||||
|
||||
Action = () => Current.Value = !Current.Value;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
hoveredColour = colours.YellowDark;
|
||||
BorderColour = unhoveredColour = colours.Gray1.Opacity(0.9f);
|
||||
|
||||
Content.BorderColour = unhoveredColour = colours.Gray1;
|
||||
BackgroundColour = colours.Gray1;
|
||||
|
||||
SpriteIcon icon;
|
||||
|
||||
AddRange(new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colours.Gray1,
|
||||
Alpha = 0.9f,
|
||||
},
|
||||
icon = new SpriteIcon
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(20),
|
||||
}
|
||||
});
|
||||
|
||||
Current.ValueChanged += muted =>
|
||||
{
|
||||
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.Icon = muted.NewValue ? FontAwesome.Solid.VolumeMute : FontAwesome.Solid.VolumeUp;
|
||||
};
|
||||
|
||||
Current.TriggerChange();
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
{
|
||||
this.TransformTo<MuteButton, SRGBColour>("BorderColour", hoveredColour, 500, Easing.OutQuint);
|
||||
Content.TransformTo<Container<Drawable>, SRGBColour>("BorderColour", hoveredColour, 500, Easing.OutQuint);
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(HoverLostEvent e)
|
||||
{
|
||||
this.TransformTo<MuteButton, SRGBColour>("BorderColour", unhoveredColour, 500, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
Current.Value = !Current.Value;
|
||||
return true;
|
||||
Content.TransformTo<Container<Drawable>, SRGBColour>("BorderColour", unhoveredColour, 500, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ namespace osu.iOS
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
UIApplication.Main(args, null, "AppDelegate");
|
||||
UIApplication.Main(args, "GameUIApplication", "AppDelegate");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user