1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 13:12:54 +08:00

Renamed UpdateableFlag to ClickableUpdateableFlag.

This commit is contained in:
yesseruser 2023-11-21 19:02:23 +01:00
parent 4b5ef8328b
commit 671177e871
11 changed files with 16 additions and 16 deletions

View File

@ -80,7 +80,7 @@ namespace osu.Game.Tests.Visual.Menus
AddStep("click on flag", () => AddStep("click on flag", () =>
{ {
InputManager.MoveMouseTo(loginOverlay.ChildrenOfType<UpdateableFlag>().First()); InputManager.MoveMouseTo(loginOverlay.ChildrenOfType<ClickableUpdateableFlag>().First());
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);
}); });
AddAssert("login overlay is hidden", () => loginOverlay.State.Value == Visibility.Hidden); AddAssert("login overlay is hidden", () => loginOverlay.State.Value == Visibility.Hidden);

View File

@ -180,7 +180,7 @@ namespace osu.Game.Online.Leaderboards
Masking = true, Masking = true,
Children = new Drawable[] Children = new Drawable[]
{ {
new UpdateableFlag(user.CountryCode) new ClickableUpdateableFlag(user.CountryCode)
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,

View File

@ -157,7 +157,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Margin = new MarginPadding { Right = horizontal_inset }, Margin = new MarginPadding { Right = horizontal_inset },
Text = score.DisplayAccuracy, Text = score.DisplayAccuracy,
}, },
new UpdateableFlag(score.User.CountryCode) new ClickableUpdateableFlag(score.User.CountryCode)
{ {
Size = new Vector2(19, 14), Size = new Vector2(19, 14),
ShowPlaceholderOnUnknown = false, ShowPlaceholderOnUnknown = false,

View File

@ -27,7 +27,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private readonly UpdateableAvatar avatar; private readonly UpdateableAvatar avatar;
private readonly LinkFlowContainer usernameText; private readonly LinkFlowContainer usernameText;
private readonly DrawableDate achievedOn; private readonly DrawableDate achievedOn;
private readonly UpdateableFlag flag; private readonly ClickableUpdateableFlag flag;
public TopScoreUserSection() public TopScoreUserSection()
{ {
@ -112,7 +112,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
}, },
} }
}, },
flag = new UpdateableFlag flag = new ClickableUpdateableFlag
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,

View File

@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Profile.Header
private OsuSpriteText usernameText = null!; private OsuSpriteText usernameText = null!;
private ExternalLinkButton openUserExternally = null!; private ExternalLinkButton openUserExternally = null!;
private OsuSpriteText titleText = null!; private OsuSpriteText titleText = null!;
private UpdateableFlag userFlag = null!; private ClickableUpdateableFlag userFlag = null!;
private OsuHoverContainer userCountryContainer = null!; private OsuHoverContainer userCountryContainer = null!;
private OsuSpriteText userCountryText = null!; private OsuSpriteText userCountryText = null!;
private GroupBadgeFlow groupBadgeFlow = null!; private GroupBadgeFlow groupBadgeFlow = null!;
@ -162,7 +162,7 @@ namespace osu.Game.Overlays.Profile.Header
Direction = FillDirection.Horizontal, Direction = FillDirection.Horizontal,
Children = new Drawable[] Children = new Drawable[]
{ {
userFlag = new UpdateableFlag userFlag = new ClickableUpdateableFlag
{ {
Size = new Vector2(28, 20), Size = new Vector2(28, 20),
ShowPlaceholderOnUnknown = false, ShowPlaceholderOnUnknown = false,

View File

@ -34,7 +34,7 @@ namespace osu.Game.Overlays.Rankings
private readonly Container content; private readonly Container content;
private readonly Box background; private readonly Box background;
private readonly UpdateableFlag flag; private readonly ClickableUpdateableFlag flag;
private readonly OsuSpriteText countryName; private readonly OsuSpriteText countryName;
public CountryPill() public CountryPill()
@ -74,7 +74,7 @@ namespace osu.Game.Overlays.Rankings
Spacing = new Vector2(5, 0), Spacing = new Vector2(5, 0),
Children = new Drawable[] Children = new Drawable[]
{ {
flag = new UpdateableFlag flag = new ClickableUpdateableFlag
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,

View File

@ -96,7 +96,7 @@ namespace osu.Game.Overlays.Rankings.Tables
Margin = new MarginPadding { Bottom = row_spacing }, Margin = new MarginPadding { Bottom = row_spacing },
Children = new[] Children = new[]
{ {
new UpdateableFlag(GetCountryCode(item)) new ClickableUpdateableFlag(GetCountryCode(item))
{ {
Size = new Vector2(28, 20), Size = new Vector2(28, 20),
ShowPlaceholderOnUnknown = false, ShowPlaceholderOnUnknown = false,

View File

@ -123,7 +123,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
FillMode = FillMode.Fit, FillMode = FillMode.Fit,
User = user User = user
}, },
new UpdateableFlag new ClickableUpdateableFlag
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,

View File

@ -12,14 +12,14 @@ namespace osu.Game.Screens.Play.HUD
{ {
public partial class PlayerFlag : CompositeDrawable, ISerialisableDrawable public partial class PlayerFlag : CompositeDrawable, ISerialisableDrawable
{ {
private readonly UpdateableFlag flag; private readonly ClickableUpdateableFlag flag;
private const float default_size = 40f; private const float default_size = 40f;
public PlayerFlag() public PlayerFlag()
{ {
Size = new Vector2(default_size, default_size / 1.4f); Size = new Vector2(default_size, default_size / 1.4f);
InternalChild = flag = new UpdateableFlag InternalChild = flag = new ClickableUpdateableFlag
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}; };

View File

@ -11,7 +11,7 @@ using osu.Game.Overlays;
namespace osu.Game.Users.Drawables namespace osu.Game.Users.Drawables
{ {
public partial class UpdateableFlag : ModelBackedDrawable<CountryCode> public partial class ClickableUpdateableFlag : ModelBackedDrawable<CountryCode>
{ {
public CountryCode CountryCode public CountryCode CountryCode
{ {
@ -30,7 +30,7 @@ namespace osu.Game.Users.Drawables
/// </summary> /// </summary>
public Action? Action; public Action? Action;
public UpdateableFlag(CountryCode countryCode = CountryCode.Unknown) public ClickableUpdateableFlag(CountryCode countryCode = CountryCode.Unknown)
{ {
CountryCode = countryCode; CountryCode = countryCode;
} }

View File

@ -52,7 +52,7 @@ namespace osu.Game.Users
protected UpdateableAvatar CreateAvatar() => new UpdateableAvatar(User, false); protected UpdateableAvatar CreateAvatar() => new UpdateableAvatar(User, false);
protected UpdateableFlag CreateFlag() => new UpdateableFlag(User.CountryCode) protected ClickableUpdateableFlag CreateFlag() => new ClickableUpdateableFlag(User.CountryCode)
{ {
Size = new Vector2(36, 26), Size = new Vector2(36, 26),
Action = Action, Action = Action,