1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 02:15:37 +08:00

Adjust scale and CI fixes

This commit is contained in:
EVAST9919 2017-05-04 17:59:01 +03:00
parent 66c858030a
commit 95f6c999bd
3 changed files with 10 additions and 19 deletions

View File

@ -1,18 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Testing;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Sprites;
using osu.Game.Screens.Menu;
using OpenTK.Graphics;
using osu.Game.Screens.Play;
using osu.Framework.Allocation;
using osu.Game.Overlays.Mods;
using osu.Game.Database;
using osu.Game.Rulesets.Mods;
using OpenTK; using OpenTK;
using osu.Framework.Graphics;
using osu.Game.Screens.Play;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {
@ -34,7 +25,7 @@ namespace osu.Desktop.VisualTests.Tests
Position = new Vector2(0, 25), Position = new Vector2(0, 25),
}); });
modsContainer.Mods.BindTo(modSelect.SelectedMods); modsContainer.Mods.BindTo(ModSelect.SelectedMods);
} }
} }
} }

View File

@ -13,7 +13,7 @@ namespace osu.Desktop.VisualTests.Tests
{ {
public override string Description => @"Tests the mod select overlay"; public override string Description => @"Tests the mod select overlay";
protected ModSelectOverlay modSelect; protected ModSelectOverlay ModSelect;
private RulesetDatabase rulesets; private RulesetDatabase rulesets;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
@ -26,17 +26,17 @@ namespace osu.Desktop.VisualTests.Tests
{ {
base.Reset(); base.Reset();
Add(modSelect = new ModSelectOverlay Add(ModSelect = new ModSelectOverlay
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
}); });
AddStep("Toggle", modSelect.ToggleVisibility); AddStep("Toggle", ModSelect.ToggleVisibility);
foreach (var ruleset in rulesets.AllRulesets) foreach (var ruleset in rulesets.AllRulesets)
AddStep(ruleset.CreateInstance().Description, () => modSelect.Ruleset.Value = ruleset); AddStep(ruleset.CreateInstance().Description, () => ModSelect.Ruleset.Value = ruleset);
} }
} }
} }

View File

@ -14,8 +14,6 @@ namespace osu.Game.Screens.Play
{ {
public class ModsContainer : Container public class ModsContainer : Container
{ {
private readonly FillFlowContainer<ModIcon> iconsContainer;
public readonly Bindable<IEnumerable<Mod>> Mods = new Bindable<IEnumerable<Mod>>(); public readonly Bindable<IEnumerable<Mod>> Mods = new Bindable<IEnumerable<Mod>>();
private bool showMods; private bool showMods;
@ -37,6 +35,8 @@ namespace osu.Game.Screens.Play
public ModsContainer() public ModsContainer()
{ {
FillFlowContainer<ModIcon> iconsContainer;
Children = new Drawable[] Children = new Drawable[]
{ {
iconsContainer = new FillFlowContainer<ModIcon> iconsContainer = new FillFlowContainer<ModIcon>
@ -65,7 +65,7 @@ namespace osu.Game.Screens.Play
iconsContainer.Add(new ModIcon(mod) iconsContainer.Add(new ModIcon(mod)
{ {
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Scale = new Vector2(0.7f), Scale = new Vector2(0.65f),
}); });
} }
}; };