1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00

RulesetTabItem -> ProfileRulesetTabItem

This commit is contained in:
smoogipoo 2019-06-27 14:54:31 +09:00
parent 803198ff20
commit 7f5587d894
3 changed files with 8 additions and 8 deletions

View File

@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.Online
public override IReadOnlyList<Type> RequiredTypes => new[] public override IReadOnlyList<Type> RequiredTypes => new[]
{ {
typeof(ProfileRulesetSelector), typeof(ProfileRulesetSelector),
typeof(RulesetTabItem), typeof(ProfileRulesetTabItem),
}; };
public TestSceneProfileRulesetSelector() public TestSceneProfileRulesetSelector()

View File

@ -28,7 +28,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
foreach (TabItem<RulesetInfo> tabItem in TabContainer) foreach (TabItem<RulesetInfo> tabItem in TabContainer)
{ {
((RulesetTabItem)tabItem).AccentColour = value; ((ProfileRulesetTabItem)tabItem).AccentColour = value;
} }
} }
} }
@ -46,7 +46,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
AccentColour = colours.Seafoam; AccentColour = colours.Seafoam;
} }
protected override TabItem<RulesetInfo> CreateTabItem(RulesetInfo value) => new RulesetTabItem(value) protected override TabItem<RulesetInfo> CreateTabItem(RulesetInfo value) => new ProfileRulesetTabItem(value)
{ {
AccentColour = AccentColour AccentColour = AccentColour
}; };
@ -55,7 +55,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{ {
// Todo: This method shouldn't exist, but bindables don't provide the concept of observing a change to the default value // Todo: This method shouldn't exist, but bindables don't provide the concept of observing a change to the default value
foreach (TabItem<RulesetInfo> tabItem in TabContainer) foreach (TabItem<RulesetInfo> tabItem in TabContainer)
((RulesetTabItem)tabItem).IsDefault = ((RulesetTabItem)tabItem).Value.ID == ruleset.ID; ((ProfileRulesetTabItem)tabItem).IsDefault = ((ProfileRulesetTabItem)tabItem).Value.ID == ruleset.ID;
} }
public void SelectDefaultRuleset() public void SelectDefaultRuleset()
@ -63,9 +63,9 @@ namespace osu.Game.Overlays.Profile.Header.Components
// Todo: This method shouldn't exist, but bindables don't provide the concept of observing a change to the default value // Todo: This method shouldn't exist, but bindables don't provide the concept of observing a change to the default value
foreach (TabItem<RulesetInfo> tabItem in TabContainer) foreach (TabItem<RulesetInfo> tabItem in TabContainer)
{ {
if (((RulesetTabItem)tabItem).IsDefault) if (((ProfileRulesetTabItem)tabItem).IsDefault)
{ {
Current.Value = ((RulesetTabItem)tabItem).Value; Current.Value = ((ProfileRulesetTabItem)tabItem).Value;
return; return;
} }
} }

View File

@ -15,7 +15,7 @@ using osuTK.Graphics;
namespace osu.Game.Overlays.Profile.Header.Components namespace osu.Game.Overlays.Profile.Header.Components
{ {
public class RulesetTabItem : TabItem<RulesetInfo> public class ProfileRulesetTabItem : TabItem<RulesetInfo>
{ {
private readonly OsuSpriteText text; private readonly OsuSpriteText text;
private readonly SpriteIcon icon; private readonly SpriteIcon icon;
@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
} }
} }
public RulesetTabItem(RulesetInfo value) public ProfileRulesetTabItem(RulesetInfo value)
: base(value) : base(value)
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;