Rename all remaining cases

This commit is contained in:
Dean Herbert
2021-10-03 00:55:29 +09:00
parent 973c31132b
commit ec61c3c5ee
58 changed files with 342 additions and 341 deletions

View File

@ -178,21 +178,21 @@ namespace osu.Game.Overlays.BeatmapSet
}
starRatingContainer.FadeOut(100);
Beatmap.Value = Difficulties.FirstOrDefault()?.Beatmap;
Beatmap.Value = Difficulties.FirstOrDefault()?.BeatmapInfo;
plays.Value = BeatmapSet?.OnlineInfo.PlayCount ?? 0;
favourites.Value = BeatmapSet?.OnlineInfo.FavouriteCount ?? 0;
updateDifficultyButtons();
}
private void showBeatmap(BeatmapInfo beatmap)
private void showBeatmap(BeatmapInfo beatmapInfo)
{
version.Text = beatmap?.Version;
version.Text = beatmapInfo?.Version;
}
private void updateDifficultyButtons()
{
Difficulties.Children.ToList().ForEach(diff => diff.State = diff.Beatmap == Beatmap.Value ? DifficultySelectorState.Selected : DifficultySelectorState.NotSelected);
Difficulties.Children.ToList().ForEach(diff => diff.State = diff.BeatmapInfo == Beatmap.Value ? DifficultySelectorState.Selected : DifficultySelectorState.NotSelected);
}
public class DifficultiesContainer : FillFlowContainer<DifficultySelectorButton>
@ -216,7 +216,7 @@ namespace osu.Game.Overlays.BeatmapSet
private readonly Box backgroundBox;
private readonly DifficultyIcon icon;
public readonly BeatmapInfo Beatmap;
public readonly BeatmapInfo BeatmapInfo;
public Action<BeatmapInfo> OnHovered;
public Action<BeatmapInfo> OnClicked;
@ -241,9 +241,9 @@ namespace osu.Game.Overlays.BeatmapSet
}
}
public DifficultySelectorButton(BeatmapInfo beatmap)
public DifficultySelectorButton(BeatmapInfo beatmapInfo)
{
Beatmap = beatmap;
BeatmapInfo = beatmapInfo;
Size = new Vector2(size);
Margin = new MarginPadding { Horizontal = tile_spacing / 2 };
@ -260,7 +260,7 @@ namespace osu.Game.Overlays.BeatmapSet
Alpha = 0.5f
}
},
icon = new DifficultyIcon(beatmap, shouldShowTooltip: false)
icon = new DifficultyIcon(beatmapInfo, shouldShowTooltip: false)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -273,7 +273,7 @@ namespace osu.Game.Overlays.BeatmapSet
protected override bool OnHover(HoverEvent e)
{
fadeIn();
OnHovered?.Invoke(Beatmap);
OnHovered?.Invoke(BeatmapInfo);
return base.OnHover(e);
}
@ -286,7 +286,7 @@ namespace osu.Game.Overlays.BeatmapSet
protected override bool OnClick(ClickEvent e)
{
OnClicked?.Invoke(Beatmap);
OnClicked?.Invoke(BeatmapInfo);
return base.OnClick(e);
}

View File

@ -24,10 +24,10 @@ namespace osu.Game.Overlays.BeatmapSet
public readonly Bindable<BeatmapSetInfo> BeatmapSet = new Bindable<BeatmapSetInfo>();
public BeatmapInfo Beatmap
public BeatmapInfo BeatmapInfo
{
get => successRate.Beatmap;
set => successRate.Beatmap = value;
get => successRate.BeatmapInfo;
set => successRate.BeatmapInfo = value;
}
public Info()

View File

@ -23,16 +23,16 @@ namespace osu.Game.Overlays.BeatmapSet
private readonly Bar successRate;
private readonly Container percentContainer;
private BeatmapInfo beatmap;
private BeatmapInfo beatmapInfo;
public BeatmapInfo Beatmap
public BeatmapInfo BeatmapInfo
{
get => beatmap;
get => beatmapInfo;
set
{
if (value == beatmap) return;
if (value == beatmapInfo) return;
beatmap = value;
beatmapInfo = value;
updateDisplay();
}
@ -40,15 +40,15 @@ namespace osu.Game.Overlays.BeatmapSet
private void updateDisplay()
{
int passCount = beatmap?.OnlineInfo?.PassCount ?? 0;
int playCount = beatmap?.OnlineInfo?.PlayCount ?? 0;
int passCount = beatmapInfo?.OnlineInfo?.PassCount ?? 0;
int playCount = beatmapInfo?.OnlineInfo?.PlayCount ?? 0;
var rate = playCount != 0 ? (float)passCount / playCount : 0;
successPercent.Text = rate.ToLocalisableString(@"0.#%");
successRate.Length = rate;
percentContainer.ResizeWidthTo(successRate.Length, 250, Easing.InOutCubic);
Graph.Metrics = beatmap?.Metrics;
Graph.Metrics = beatmapInfo?.Metrics;
}
public SuccessRate()