mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 20:07:29 +08:00
RulesetTabItem -> ProfileRulesetTabItem
This commit is contained in:
parent
803198ff20
commit
7f5587d894
@ -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()
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
Loading…
Reference in New Issue
Block a user