Merge branch 'osu-clickable-container' into OsuHoverContainer

This commit is contained in:
Dean Herbert
2019-06-05 10:34:20 +09:00
6 changed files with 131 additions and 3 deletions

View File

@ -31,7 +31,7 @@ namespace osu.Game.Graphics.Containers
{
if (AutoSizeAxes != Axes.None)
{
content.RelativeSizeAxes = RelativeSizeAxes;
content.RelativeSizeAxes = (Axes.Both & ~AutoSizeAxes);
content.AutoSizeAxes = AutoSizeAxes;
}

View File

@ -66,6 +66,7 @@ namespace osu.Game.Graphics.UserInterface
set
{
Content.RelativeSizeAxes = Axes.None;
Content.AutoSizeAxes = Axes.None;
Content.Size = value;
}
}

View File

@ -74,6 +74,12 @@ namespace osu.Game.Graphics.UserInterface
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
if (AutoSizeAxes != Axes.None)
{
content.RelativeSizeAxes = (Axes.Both & ~AutoSizeAxes);
content.AutoSizeAxes = AutoSizeAxes;
}
Enabled.BindValueChanged(enabled => this.FadeColour(enabled.NewValue ? Color4.White : colours.Gray9, 200, Easing.OutQuint), true);
}