mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 10:23:20 +08:00
Merge branch 'master' into beatmap-info-purge
This commit is contained in:
commit
cf905d0f5c
@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Mania.Configuration
|
||||
{
|
||||
base.InitialiseDefaults();
|
||||
|
||||
SetDefault(ManiaRulesetSetting.ScrollSpeed, 8, 1, 40);
|
||||
SetDefault(ManiaRulesetSetting.ScrollSpeed, 8.0, 1.0, 40.0, 0.1);
|
||||
SetDefault(ManiaRulesetSetting.ScrollDirection, ManiaScrollingDirection.Down);
|
||||
SetDefault(ManiaRulesetSetting.TimingBasedNoteColouring, false);
|
||||
|
||||
@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Mania.Configuration
|
||||
|
||||
if (Get<double?>(ManiaRulesetSetting.ScrollTime) is double scrollTime)
|
||||
{
|
||||
SetValue(ManiaRulesetSetting.ScrollSpeed, (int)Math.Round(DrawableManiaRuleset.MAX_TIME_RANGE / scrollTime));
|
||||
SetValue(ManiaRulesetSetting.ScrollSpeed, Math.Round(DrawableManiaRuleset.MAX_TIME_RANGE / scrollTime));
|
||||
SetValue<double?>(ManiaRulesetSetting.ScrollTime, null);
|
||||
}
|
||||
#pragma warning restore CS0618
|
||||
@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Mania.Configuration
|
||||
|
||||
public override TrackedSettings CreateTrackedSettings() => new TrackedSettings
|
||||
{
|
||||
new TrackedSetting<int>(ManiaRulesetSetting.ScrollSpeed,
|
||||
new TrackedSetting<double>(ManiaRulesetSetting.ScrollSpeed,
|
||||
speed => new SettingDescription(
|
||||
rawValue: speed,
|
||||
name: RulesetSettingsStrings.ScrollSpeed,
|
||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Mania.Edit
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
TargetTimeRange = TimelineTimeRange == null || ShowSpeedChanges.Value ? ComputeScrollTime(Config.Get<int>(ManiaRulesetSetting.ScrollSpeed)) : TimelineTimeRange.Value;
|
||||
TargetTimeRange = TimelineTimeRange == null || ShowSpeedChanges.Value ? ComputeScrollTime(Config.Get<double>(ManiaRulesetSetting.ScrollSpeed)) : TimelineTimeRange.Value;
|
||||
base.Update();
|
||||
}
|
||||
}
|
||||
|
@ -33,11 +33,11 @@ namespace osu.Game.Rulesets.Mania
|
||||
LabelText = RulesetSettingsStrings.ScrollingDirection,
|
||||
Current = config.GetBindable<ManiaScrollingDirection>(ManiaRulesetSetting.ScrollDirection)
|
||||
},
|
||||
new SettingsSlider<int, ManiaScrollSlider>
|
||||
new SettingsSlider<double, ManiaScrollSlider>
|
||||
{
|
||||
LabelText = RulesetSettingsStrings.ScrollSpeed,
|
||||
Current = config.GetBindable<int>(ManiaRulesetSetting.ScrollSpeed),
|
||||
KeyboardStep = 5
|
||||
Current = config.GetBindable<double>(ManiaRulesetSetting.ScrollSpeed),
|
||||
KeyboardStep = 1
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
@ -48,7 +48,7 @@ namespace osu.Game.Rulesets.Mania
|
||||
};
|
||||
}
|
||||
|
||||
private partial class ManiaScrollSlider : RoundedSliderBar<int>
|
||||
private partial class ManiaScrollSlider : RoundedSliderBar<double>
|
||||
{
|
||||
public override LocalisableString TooltipText => RulesetSettingsStrings.ScrollSpeedTooltip((int)DrawableManiaRuleset.ComputeScrollTime(Current.Value), Current.Value);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
protected new ManiaRulesetConfigManager Config => (ManiaRulesetConfigManager)base.Config;
|
||||
|
||||
private readonly Bindable<ManiaScrollingDirection> configDirection = new Bindable<ManiaScrollingDirection>();
|
||||
private readonly BindableInt configScrollSpeed = new BindableInt();
|
||||
private readonly BindableDouble configScrollSpeed = new BindableDouble();
|
||||
|
||||
private double currentTimeRange;
|
||||
protected double TargetTimeRange;
|
||||
@ -160,7 +160,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
/// </summary>
|
||||
/// <param name="scrollSpeed">The scroll speed.</param>
|
||||
/// <returns>The scroll time.</returns>
|
||||
public static double ComputeScrollTime(int scrollSpeed) => MAX_TIME_RANGE / scrollSpeed;
|
||||
public static double ComputeScrollTime(double scrollSpeed) => MAX_TIME_RANGE / scrollSpeed;
|
||||
|
||||
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new ManiaPlayfieldAdjustmentContainer();
|
||||
|
||||
|
@ -38,6 +38,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
MinValue = 0f,
|
||||
MaxValue = OsuPlayfield.BASE_SIZE.X,
|
||||
Precision = 0.01f,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -47,6 +48,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
MinValue = 0f,
|
||||
MaxValue = OsuPlayfield.BASE_SIZE.Y,
|
||||
Precision = 0.01f,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -56,6 +58,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
MinValue = 4f,
|
||||
MaxValue = 128f,
|
||||
Precision = 0.01f,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -65,6 +68,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
MinValue = -180f,
|
||||
MaxValue = 180f,
|
||||
Precision = 0.01f,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -1000,7 +1000,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
Assert.That(decoded.WidescreenStoryboard, Is.False);
|
||||
Assert.That(decoded.EpilepsyWarning, Is.False);
|
||||
Assert.That(decoded.SamplesMatchPlaybackRate, Is.False);
|
||||
Assert.That(decoded.Countdown, Is.EqualTo(CountdownType.Normal));
|
||||
Assert.That(decoded.Countdown, Is.EqualTo(CountdownType.None));
|
||||
Assert.That(decoded.CountdownOffset, Is.EqualTo(0));
|
||||
Assert.That(decoded.BeatmapInfo.Metadata.PreviewTime, Is.EqualTo(-1));
|
||||
Assert.That(decoded.BeatmapInfo.Ruleset.OnlineID, Is.EqualTo(0));
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
@ -58,6 +59,16 @@ namespace osu.Game.Tests.Visual.Online
|
||||
return true;
|
||||
}
|
||||
|
||||
if (req is GetUserBeatmapsRequest getUserBeatmapsRequest)
|
||||
{
|
||||
getUserBeatmapsRequest.TriggerSuccess(new List<APIBeatmapSet>
|
||||
{
|
||||
CreateAPIBeatmapSet(),
|
||||
CreateAPIBeatmapSet()
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
});
|
||||
|
@ -127,7 +127,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public bool EpilepsyWarning { get; set; }
|
||||
|
||||
public bool SamplesMatchPlaybackRate { get; set; } = true;
|
||||
public bool SamplesMatchPlaybackRate { get; set; }
|
||||
|
||||
public double DistanceSpacing { get; set; } = 1.0;
|
||||
|
||||
@ -135,7 +135,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public double TimelineZoom { get; set; } = 1.0;
|
||||
|
||||
public CountdownType Countdown { get; set; } = CountdownType.Normal;
|
||||
public CountdownType Countdown { get; set; } = CountdownType.None;
|
||||
|
||||
public int CountdownOffset { get; set; }
|
||||
|
||||
|
@ -86,7 +86,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
};
|
||||
|
||||
Status = BeatmapOnlineStatus.None;
|
||||
TextPadding = new MarginPadding { Horizontal = 5, Bottom = 1 };
|
||||
TextPadding = new MarginPadding { Horizontal = 4, Bottom = 1 };
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
@ -20,9 +20,9 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
public abstract partial class BeatmapCard : OsuClickableContainer, IHasContextMenu
|
||||
{
|
||||
public const float TRANSITION_DURATION = 340;
|
||||
public const float CORNER_RADIUS = 10;
|
||||
public const float CORNER_RADIUS = 8;
|
||||
|
||||
protected const float WIDTH = 430;
|
||||
protected const float WIDTH = 345;
|
||||
|
||||
public IBindable<bool> Expanded { get; }
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
protected override Drawable IdleContent => idleBottomContent;
|
||||
protected override Drawable DownloadInProgressContent => downloadProgressBar;
|
||||
|
||||
private const float height = 140;
|
||||
private const float height = 112;
|
||||
|
||||
[Cached]
|
||||
private readonly BeatmapCardContent content;
|
||||
@ -68,7 +68,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
Padding = new MarginPadding { Right = CORNER_RADIUS },
|
||||
Child = leftIconArea = new FillFlowContainer
|
||||
{
|
||||
Margin = new MarginPadding(5),
|
||||
Margin = new MarginPadding(4),
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(1)
|
||||
@ -80,7 +80,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
Width = WIDTH - height + CORNER_RADIUS,
|
||||
FavouriteState = { BindTarget = FavouriteState },
|
||||
ButtonsCollapsedWidth = CORNER_RADIUS,
|
||||
ButtonsExpandedWidth = 30,
|
||||
ButtonsExpandedWidth = 24,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
@ -109,7 +109,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
new TruncatingSpriteText
|
||||
{
|
||||
Text = new RomanisableString(BeatmapSet.TitleUnicode, BeatmapSet.Title),
|
||||
Font = OsuFont.Default.With(size: 22.5f, weight: FontWeight.SemiBold),
|
||||
Font = OsuFont.Default.With(size: 18f, weight: FontWeight.SemiBold),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
},
|
||||
titleBadgeArea = new FillFlowContainer
|
||||
@ -142,7 +142,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
new TruncatingSpriteText
|
||||
{
|
||||
Text = createArtistText(),
|
||||
Font = OsuFont.Default.With(size: 17.5f, weight: FontWeight.SemiBold),
|
||||
Font = OsuFont.Default.With(size: 14f, weight: FontWeight.SemiBold),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
},
|
||||
Empty()
|
||||
@ -154,7 +154,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Text = BeatmapSet.Source,
|
||||
Shadow = false,
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold),
|
||||
Font = OsuFont.GetFont(size: 11f, weight: FontWeight.SemiBold),
|
||||
Colour = colourProvider.Content2
|
||||
},
|
||||
}
|
||||
@ -173,18 +173,18 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 3),
|
||||
Spacing = new Vector2(0, 2),
|
||||
AlwaysPresent = true,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new LinkFlowContainer(s =>
|
||||
{
|
||||
s.Shadow = false;
|
||||
s.Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold);
|
||||
s.Font = OsuFont.GetFont(size: 11f, weight: FontWeight.SemiBold);
|
||||
}).With(d =>
|
||||
{
|
||||
d.AutoSizeAxes = Axes.Both;
|
||||
d.Margin = new MarginPadding { Top = 2 };
|
||||
d.Margin = new MarginPadding { Top = 1 };
|
||||
d.AddText("mapped by ", t => t.Colour = colourProvider.Content2);
|
||||
d.AddUserLink(BeatmapSet.Author);
|
||||
}),
|
||||
@ -215,7 +215,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
downloadProgressBar = new BeatmapCardDownloadProgressBar
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 6,
|
||||
Height = 5,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
State = { BindTarget = DownloadTracker.State },
|
||||
@ -231,17 +231,17 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Padding = new MarginPadding { Horizontal = 10, Vertical = 13 },
|
||||
Padding = new MarginPadding { Horizontal = 8, Vertical = 10 },
|
||||
Child = new BeatmapCardDifficultyList(BeatmapSet)
|
||||
};
|
||||
c.Expanded.BindTarget = Expanded;
|
||||
});
|
||||
|
||||
if (BeatmapSet.HasVideo)
|
||||
leftIconArea.Add(new VideoIconPill { IconSize = new Vector2(20) });
|
||||
leftIconArea.Add(new VideoIconPill { IconSize = new Vector2(16) });
|
||||
|
||||
if (BeatmapSet.HasStoryboard)
|
||||
leftIconArea.Add(new StoryboardIconPill { IconSize = new Vector2(20) });
|
||||
leftIconArea.Add(new StoryboardIconPill { IconSize = new Vector2(16) });
|
||||
|
||||
if (BeatmapSet.FeaturedInSpotlight)
|
||||
{
|
||||
@ -249,7 +249,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Margin = new MarginPadding { Left = 5 }
|
||||
Margin = new MarginPadding { Left = 4 }
|
||||
});
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Margin = new MarginPadding { Left = 5 }
|
||||
Margin = new MarginPadding { Left = 4 }
|
||||
});
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Margin = new MarginPadding { Left = 5 }
|
||||
Margin = new MarginPadding { Left = 4 }
|
||||
};
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
BeatmapCardStatistic withMargin(BeatmapCardStatistic original)
|
||||
{
|
||||
original.Margin = new MarginPadding { Right = 10 };
|
||||
original.Margin = new MarginPadding { Right = 8 };
|
||||
return original;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(4, 0),
|
||||
Spacing = new Vector2(3, 0),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new BeatmapSetOnlineStatusPill
|
||||
@ -33,13 +33,14 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Status = beatmapSet.Status,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft
|
||||
Origin = Anchor.CentreLeft,
|
||||
TextSize = 13f
|
||||
},
|
||||
new DifficultySpectrumDisplay(beatmapSet)
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
DotSize = new Vector2(6, 12)
|
||||
DotSize = new Vector2(5, 10)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
protected override Drawable IdleContent => idleBottomContent;
|
||||
protected override Drawable DownloadInProgressContent => downloadProgressBar;
|
||||
|
||||
public const float HEIGHT = 100;
|
||||
public const float HEIGHT = 80;
|
||||
|
||||
[Cached]
|
||||
private readonly BeatmapCardContent content;
|
||||
@ -69,7 +69,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
Padding = new MarginPadding { Right = CORNER_RADIUS },
|
||||
Child = leftIconArea = new FillFlowContainer
|
||||
{
|
||||
Margin = new MarginPadding(5),
|
||||
Margin = new MarginPadding(4),
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(1)
|
||||
@ -81,7 +81,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
Width = WIDTH - HEIGHT + CORNER_RADIUS,
|
||||
FavouriteState = { BindTarget = FavouriteState },
|
||||
ButtonsCollapsedWidth = CORNER_RADIUS,
|
||||
ButtonsExpandedWidth = 30,
|
||||
ButtonsExpandedWidth = 24,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
@ -110,7 +110,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
new TruncatingSpriteText
|
||||
{
|
||||
Text = new RomanisableString(BeatmapSet.TitleUnicode, BeatmapSet.Title),
|
||||
Font = OsuFont.Default.With(size: 22.5f, weight: FontWeight.SemiBold),
|
||||
Font = OsuFont.Default.With(size: 18f, weight: FontWeight.SemiBold),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
},
|
||||
titleBadgeArea = new FillFlowContainer
|
||||
@ -143,7 +143,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
new TruncatingSpriteText
|
||||
{
|
||||
Text = createArtistText(),
|
||||
Font = OsuFont.Default.With(size: 17.5f, weight: FontWeight.SemiBold),
|
||||
Font = OsuFont.Default.With(size: 14f, weight: FontWeight.SemiBold),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
},
|
||||
Empty()
|
||||
@ -153,11 +153,11 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
new LinkFlowContainer(s =>
|
||||
{
|
||||
s.Shadow = false;
|
||||
s.Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold);
|
||||
s.Font = OsuFont.GetFont(size: 11f, weight: FontWeight.SemiBold);
|
||||
}).With(d =>
|
||||
{
|
||||
d.AutoSizeAxes = Axes.Both;
|
||||
d.Margin = new MarginPadding { Top = 2 };
|
||||
d.Margin = new MarginPadding { Top = 1 };
|
||||
d.AddText("mapped by ", t => t.Colour = colourProvider.Content2);
|
||||
d.AddUserLink(BeatmapSet.Author);
|
||||
}),
|
||||
@ -177,7 +177,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 3),
|
||||
Spacing = new Vector2(0, 2),
|
||||
AlwaysPresent = true,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -186,7 +186,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(10, 0),
|
||||
Spacing = new Vector2(8, 0),
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true,
|
||||
ChildrenEnumerable = createStatistics()
|
||||
@ -197,7 +197,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
downloadProgressBar = new BeatmapCardDownloadProgressBar
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 6,
|
||||
Height = 5,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
State = { BindTarget = DownloadTracker.State },
|
||||
@ -213,17 +213,17 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Padding = new MarginPadding { Horizontal = 10, Vertical = 13 },
|
||||
Padding = new MarginPadding { Horizontal = 8, Vertical = 10 },
|
||||
Child = new BeatmapCardDifficultyList(BeatmapSet)
|
||||
};
|
||||
c.Expanded.BindTarget = Expanded;
|
||||
});
|
||||
|
||||
if (BeatmapSet.HasVideo)
|
||||
leftIconArea.Add(new VideoIconPill { IconSize = new Vector2(20) });
|
||||
leftIconArea.Add(new VideoIconPill { IconSize = new Vector2(16) });
|
||||
|
||||
if (BeatmapSet.HasStoryboard)
|
||||
leftIconArea.Add(new StoryboardIconPill { IconSize = new Vector2(20) });
|
||||
leftIconArea.Add(new StoryboardIconPill { IconSize = new Vector2(16) });
|
||||
|
||||
if (BeatmapSet.FeaturedInSpotlight)
|
||||
{
|
||||
@ -231,7 +231,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Margin = new MarginPadding { Left = 5 }
|
||||
Margin = new MarginPadding { Left = 4 }
|
||||
});
|
||||
}
|
||||
|
||||
@ -241,7 +241,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Margin = new MarginPadding { Left = 5 }
|
||||
Margin = new MarginPadding { Left = 4 }
|
||||
});
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Margin = new MarginPadding { Left = 5 }
|
||||
Margin = new MarginPadding { Left = 4 }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -46,21 +46,21 @@ namespace osu.Game.Beatmaps.Drawables.Cards.Statistics
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(5, 0),
|
||||
Spacing = new Vector2(4, 0),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
spriteIcon = new SpriteIcon
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Size = new Vector2(10),
|
||||
Size = new Vector2(8),
|
||||
Margin = new MarginPadding { Top = 1 }
|
||||
},
|
||||
spriteText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Font = OsuFont.Default.With(size: 14)
|
||||
Font = OsuFont.Default.With(size: 11)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -192,7 +192,6 @@ namespace osu.Game.Beatmaps.Formats
|
||||
internal static void ApplyLegacyDefaults(Beatmap beatmap)
|
||||
{
|
||||
beatmap.WidescreenStoryboard = false;
|
||||
beatmap.SamplesMatchPlaybackRate = false;
|
||||
}
|
||||
|
||||
protected override void ParseLine(Beatmap beatmap, Section section, string line)
|
||||
|
@ -214,6 +214,7 @@ namespace osu.Game.Configuration
|
||||
SetDefault(OsuSetting.EditorContractSidebars, false);
|
||||
|
||||
SetDefault(OsuSetting.AlwaysShowHoldForMenuButton, false);
|
||||
SetDefault(OsuSetting.AlwaysRequireHoldingForPause, false);
|
||||
}
|
||||
|
||||
protected override bool CheckLookupContainsPrivateInformation(OsuSetting lookup)
|
||||
@ -444,5 +445,6 @@ namespace osu.Game.Configuration
|
||||
EditorRotationOrigin,
|
||||
EditorTimelineShowBreaks,
|
||||
EditorAdjustExistingObjectsOnTimingChanges,
|
||||
AlwaysRequireHoldingForPause
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +89,11 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString AlwaysShowHoldForMenuButton => new TranslatableString(getKey(@"always_show_hold_for_menu_button"), @"Always show hold for menu button");
|
||||
|
||||
/// <summary>
|
||||
/// "Require holding key to pause gameplay"
|
||||
/// </summary>
|
||||
public static LocalisableString AlwaysRequireHoldForMenu => new TranslatableString(getKey(@"require_holding_key_to_pause_gameplay"), @"Require holding key to pause gameplay");
|
||||
|
||||
/// <summary>
|
||||
/// "Always play first combo break sound"
|
||||
/// </summary>
|
||||
|
@ -80,9 +80,9 @@ namespace osu.Game.Localisation
|
||||
public static LocalisableString TimingBasedColouring => new TranslatableString(getKey(@"Timing_based_colouring"), @"Timing-based note colouring");
|
||||
|
||||
/// <summary>
|
||||
/// "{0}ms (speed {1})"
|
||||
/// "{0}ms (speed {1:N1})"
|
||||
/// </summary>
|
||||
public static LocalisableString ScrollSpeedTooltip(int scrollTime, int scrollSpeed) => new TranslatableString(getKey(@"ruleset"), @"{0}ms (speed {1})", scrollTime, scrollSpeed);
|
||||
public static LocalisableString ScrollSpeedTooltip(int scrollTime, double scrollSpeed) => new TranslatableString(getKey(@"ruleset"), @"{0}ms (speed {1:N1})", scrollTime, scrollSpeed);
|
||||
|
||||
/// <summary>
|
||||
/// "Touch control scheme"
|
||||
|
@ -7,7 +7,7 @@ using osu.Game.Online.API;
|
||||
|
||||
namespace osu.Game.Online.Rooms
|
||||
{
|
||||
public class JoinRoomRequest : APIRequest
|
||||
public class JoinRoomRequest : APIRequest<Room>
|
||||
{
|
||||
public readonly Room Room;
|
||||
public readonly string? Password;
|
||||
|
@ -366,12 +366,8 @@ namespace osu.Game.Online.Rooms
|
||||
{
|
||||
RoomID = other.RoomID;
|
||||
Name = other.Name;
|
||||
|
||||
Category = other.Category;
|
||||
|
||||
if (other.Host != null && Host?.Id != other.Host.Id)
|
||||
Host = other.Host;
|
||||
|
||||
ChannelId = other.ChannelId;
|
||||
Status = other.Status;
|
||||
Availability = other.Availability;
|
||||
@ -387,22 +383,10 @@ namespace osu.Game.Online.Rooms
|
||||
PlaylistItemStats = other.PlaylistItemStats;
|
||||
CurrentPlaylistItem = other.CurrentPlaylistItem;
|
||||
AutoSkip = other.AutoSkip;
|
||||
|
||||
other.RemoveExpiredPlaylistItems();
|
||||
|
||||
Playlist = other.Playlist;
|
||||
RecentParticipants = other.RecentParticipants;
|
||||
}
|
||||
|
||||
public void RemoveExpiredPlaylistItems()
|
||||
{
|
||||
// Todo: This is not the best way/place to do this, but the intention is to display all playlist items when the room has ended,
|
||||
// and display only the non-expired playlist items while the room is still active. In order to achieve this, all expired items are removed from the source Room.
|
||||
// More refactoring is required before this can be done locally instead - DrawableRoomPlaylist is currently directly bound to the playlist to display items in the room.
|
||||
if (Status is not RoomStatusEnded)
|
||||
Playlist = Playlist.Where(i => !i.Expired).ToArray();
|
||||
}
|
||||
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class RoomPlaylistItemStats
|
||||
{
|
||||
|
@ -198,7 +198,6 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
c.Anchor = Anchor.TopCentre;
|
||||
c.Origin = Anchor.TopCentre;
|
||||
c.Scale = new Vector2(0.8f);
|
||||
})).ToArray();
|
||||
|
||||
private static ReverseChildIDFillFlowContainer<BeatmapCard> createCardContainerFor(IEnumerable<BeatmapCard> newCards)
|
||||
|
@ -71,7 +71,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
||||
? new BeatmapCardNormal(model)
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre
|
||||
}
|
||||
: null;
|
||||
}
|
||||
|
@ -41,6 +41,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
Current = config.GetBindable<bool>(OsuSetting.GameplayLeaderboard),
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = GameplaySettingsStrings.AlwaysRequireHoldForMenu,
|
||||
Current = config.GetBindable<bool>(OsuSetting.AlwaysRequireHoldingForPause),
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = GameplaySettingsStrings.AlwaysShowHoldForMenuButton,
|
||||
Current = config.GetBindable<bool>(OsuSetting.AlwaysShowHoldForMenuButton),
|
||||
|
@ -268,7 +268,8 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
|
||||
private void updateScreenModeWarning()
|
||||
{
|
||||
if (RuntimeInfo.OS == RuntimeInfo.Platform.macOS)
|
||||
// Can be removed once we stop supporting SDL2.
|
||||
if (RuntimeInfo.OS == RuntimeInfo.Platform.macOS && !FrameworkEnvironment.UseSDL3)
|
||||
{
|
||||
if (windowModeDropdown.Current.Value == WindowMode.Fullscreen)
|
||||
windowModeDropdown.SetNoticeText(LayoutSettingsStrings.FullscreenMacOSNote, true);
|
||||
|
@ -118,7 +118,6 @@ namespace osu.Game.Screens.Menu
|
||||
"You can create mod presets to make toggling your favorite mod combinations easier!",
|
||||
"Many mods have customisation settings that drastically change how they function. Click the Mod Customisation button in mod select to view settings!",
|
||||
"Press Ctrl-Shift-R to switch to a random skin!",
|
||||
"Press Ctrl-Shift-F to toggle the FPS Counter. But make sure not to pay too much attention to it!",
|
||||
"While watching a replay, press Ctrl-H to toggle replay settings!",
|
||||
"You can easily copy the mods from scores on a leaderboard by right-clicking on them!",
|
||||
"Ctrl-Enter at song select will start a beatmap in autoplay mode!"
|
||||
|
@ -8,6 +8,9 @@ using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics.Effects;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Beatmaps;
|
||||
|
||||
@ -27,7 +30,40 @@ namespace osu.Game.Screens.Menu
|
||||
public SongTicker()
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Child = new FillFlowContainer
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Position = new Vector2(5, -5),
|
||||
Padding = new MarginPadding(-5),
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new CircularContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Radius = 75,
|
||||
Type = EdgeEffectType.Shadow,
|
||||
Colour = OsuColour.Gray(0.04f).Opacity(0.3f),
|
||||
},
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
AlwaysPresent = true,
|
||||
Alpha = 0,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
@ -47,6 +83,7 @@ namespace osu.Game.Screens.Menu
|
||||
Font = OsuFont.GetFont(size: 16)
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -60,10 +60,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
}
|
||||
|
||||
foreach (var incoming in result)
|
||||
{
|
||||
incoming.RemoveExpiredPlaylistItems();
|
||||
RoomManager.AddOrUpdateRoom(incoming);
|
||||
}
|
||||
|
||||
initialRoomsReceived.Value = true;
|
||||
tcs.SetResult(true);
|
||||
|
@ -72,9 +72,13 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
currentJoinRoomRequest?.Cancel();
|
||||
currentJoinRoomRequest = new JoinRoomRequest(room, password);
|
||||
|
||||
currentJoinRoomRequest.Success += () =>
|
||||
currentJoinRoomRequest.Success += result =>
|
||||
{
|
||||
joinedRoom.Value = room;
|
||||
|
||||
AddOrUpdateRoom(result);
|
||||
room.CopyFrom(result); // Also copy back to the source model, since this is likely to have been stored elsewhere.
|
||||
|
||||
onSuccess?.Invoke(room);
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,6 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
|
||||
req.Success += result =>
|
||||
{
|
||||
result.RemoveExpiredPlaylistItems();
|
||||
RoomManager.AddOrUpdateRoom(result);
|
||||
tcs.SetResult(true);
|
||||
};
|
||||
|
@ -438,7 +438,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
=> MaxParticipantsField.Text = room.MaxParticipants?.ToString();
|
||||
|
||||
private void updateRoomAutoStartDuration()
|
||||
=> typeLabel.Text = room.AutoStartDuration.GetLocalisableDescription();
|
||||
=> startModeDropdown.Current.Value = (StartMode)room.AutoStartDuration.TotalSeconds;
|
||||
|
||||
private void updateRoomPlaylist()
|
||||
=> drawablePlaylist.Items.ReplaceRange(0, drawablePlaylist.Items.Count, room.Playlist);
|
||||
|
@ -162,14 +162,18 @@ namespace osu.Game.Screens.Play.HUD
|
||||
private bool pendingAnimation;
|
||||
private ScheduledDelegate shakeOperation;
|
||||
|
||||
private Bindable<bool> alwaysRequireHold;
|
||||
|
||||
public HoldButton(bool isDangerousAction)
|
||||
: base(isDangerousAction)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OsuColour colours, OsuConfigManager config)
|
||||
{
|
||||
alwaysRequireHold = config.GetBindable<bool>(OsuSetting.AlwaysRequireHoldingForPause);
|
||||
|
||||
Size = new Vector2(60);
|
||||
|
||||
Child = new CircularContainer
|
||||
@ -299,7 +303,13 @@ namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
case GlobalAction.Back:
|
||||
if (!pendingAnimation)
|
||||
{
|
||||
if (IsDangerousAction || alwaysRequireHold.Value)
|
||||
BeginConfirm();
|
||||
else
|
||||
Confirm();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
case GlobalAction.PauseGameplay:
|
||||
@ -307,7 +317,13 @@ namespace osu.Game.Screens.Play.HUD
|
||||
if (ReplayLoaded.Value) return false;
|
||||
|
||||
if (!pendingAnimation)
|
||||
{
|
||||
if (IsDangerousAction || alwaysRequireHold.Value)
|
||||
BeginConfirm();
|
||||
else
|
||||
Confirm();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -976,6 +976,8 @@ namespace osu.Game.Screens.Play
|
||||
if (PauseOverlay.State.Value == Visibility.Visible)
|
||||
PauseOverlay.Hide();
|
||||
|
||||
bool restartOnFail = GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail);
|
||||
if (!restartOnFail)
|
||||
failAnimationContainer.Start();
|
||||
|
||||
// Failures can be triggered either by a judgement, or by a mod.
|
||||
@ -990,7 +992,7 @@ namespace osu.Game.Screens.Play
|
||||
ScoreProcessor.FailScore(Score.ScoreInfo);
|
||||
OnFail();
|
||||
|
||||
if (GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
|
||||
if (restartOnFail)
|
||||
Restart(true);
|
||||
});
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
||||
return true;
|
||||
}
|
||||
|
||||
joinRoomRequest.TriggerSuccess();
|
||||
joinRoomRequest.TriggerSuccess(createResponseRoom(room, true));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user