1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 07:23:14 +08:00

ToolbarMode* -> ToolbarRuleset*

This commit is contained in:
Dean Herbert 2018-07-10 01:20:21 +09:00
parent abfebbddd9
commit 974c4f5185
4 changed files with 9 additions and 9 deletions

View File

@ -16,8 +16,8 @@ namespace osu.Game.Tests.Visual
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(ToolbarButton),
typeof(ToolbarModeSelector),
typeof(ToolbarModeButton),
typeof(ToolbarRulesetSelector),
typeof(ToolbarRulesetButton),
typeof(ToolbarNotificationButton),
};

View File

@ -50,7 +50,7 @@ namespace osu.Game.Overlays.Toolbar
{
Action = () => OnHome?.Invoke()
},
new ToolbarModeSelector()
new ToolbarRulesetSelector()
}
},
new FillFlowContainer

View File

@ -7,7 +7,7 @@ using OpenTK.Graphics;
namespace osu.Game.Overlays.Toolbar
{
public class ToolbarModeButton : ToolbarButton
public class ToolbarRulesetButton : ToolbarButton
{
private RulesetInfo ruleset;
public RulesetInfo Ruleset

View File

@ -16,18 +16,18 @@ using osu.Game.Rulesets;
namespace osu.Game.Overlays.Toolbar
{
public class ToolbarModeSelector : Container
public class ToolbarRulesetSelector : Container
{
private const float padding = 10;
private readonly FillFlowContainer modeButtons;
private readonly Drawable modeButtonLine;
private ToolbarModeButton activeButton;
private ToolbarRulesetButton activeButton;
private RulesetStore rulesets;
private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();
public ToolbarModeSelector()
public ToolbarRulesetSelector()
{
RelativeSizeAxes = Axes.Y;
@ -73,7 +73,7 @@ namespace osu.Game.Overlays.Toolbar
this.rulesets = rulesets;
foreach (var r in rulesets.AvailableRulesets)
{
modeButtons.Add(new ToolbarModeButton
modeButtons.Add(new ToolbarRulesetButton
{
Ruleset = r,
Action = delegate { ruleset.Value = r; }
@ -115,7 +115,7 @@ namespace osu.Game.Overlays.Toolbar
private void rulesetChanged(RulesetInfo ruleset)
{
foreach (ToolbarModeButton m in modeButtons.Children.Cast<ToolbarModeButton>())
foreach (ToolbarRulesetButton m in modeButtons.Children.Cast<ToolbarRulesetButton>())
{
bool isActive = m.Ruleset.ID == ruleset.ID;
m.Active = isActive;