Merge branch 'master' into fix-sensitivityslider

This commit is contained in:
Dan Balasescu 2017-12-07 21:01:53 +09:00 committed by GitHub
commit 9e37a122e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 38 deletions

View File

@ -14,10 +14,10 @@ namespace osu.Game.Overlays.BeatmapSet
public DownloadButton(string title, string subtitle) public DownloadButton(string title, string subtitle)
{ {
Width = 120; Width = 120;
RelativeSizeAxes = Axes.Y;
Child = new Container Add(new Container
{ {
Depth = -1,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Horizontal = 10 }, Padding = new MarginPadding { Horizontal = 10 },
Children = new Drawable[] Children = new Drawable[]
@ -53,7 +53,7 @@ namespace osu.Game.Overlays.BeatmapSet
Margin = new MarginPadding { Right = 5 }, Margin = new MarginPadding { Right = 5 },
}, },
}, },
}; });
} }
} }
} }

View File

@ -1,6 +1,7 @@
// 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.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
@ -15,13 +16,12 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
public readonly Bindable<bool> Favourited = new Bindable<bool>(); public readonly Bindable<bool> Favourited = new Bindable<bool>();
public FavouriteButton() [BackgroundDependencyLoader]
private void load()
{ {
RelativeSizeAxes = Axes.Y;
Container pink; Container pink;
SpriteIcon icon; SpriteIcon icon;
Children = new Drawable[] AddRange(new Drawable[]
{ {
pink = new Container pink = new Container
{ {
@ -51,7 +51,7 @@ namespace osu.Game.Overlays.BeatmapSet
Size = new Vector2(18), Size = new Vector2(18),
Shadow = false, Shadow = false,
}, },
}; });
Favourited.ValueChanged += value => Favourited.ValueChanged += value =>
{ {

View File

@ -2,44 +2,27 @@
// 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.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.Containers; using osu.Framework.Allocation;
namespace osu.Game.Overlays.BeatmapSet namespace osu.Game.Overlays.BeatmapSet
{ {
public class HeaderButton : OsuClickableContainer public class HeaderButton : TriangleButton
{ {
private readonly Container content;
protected override Container<Drawable> Content => content;
public HeaderButton() public HeaderButton()
{ {
CornerRadius = 3; Height = 0;
Masking = true; RelativeSizeAxes = Axes.Y;
}
InternalChildren = new Drawable[] [BackgroundDependencyLoader]
{ private void load()
new Box {
{ BackgroundColour = OsuColour.FromHex(@"094c5f");
RelativeSizeAxes = Axes.Both, Triangles.ColourLight = OsuColour.FromHex(@"0f7c9b");
Colour = OsuColour.FromHex(@"094c5f"), Triangles.ColourDark = OsuColour.FromHex(@"094c5f");
}, Triangles.TriangleScale = 1.5f;
new Triangles
{
RelativeSizeAxes = Axes.Both,
ColourLight = OsuColour.FromHex(@"0f7c9b"),
ColourDark = OsuColour.FromHex(@"094c5f"),
TriangleScale = 1.5f,
},
content = new Container
{
RelativeSizeAxes = Axes.Both,
},
};
} }
} }
} }