Merge remote-tracking branch 'upstream/master' into HoutarouOreki-changelog-overlay

This commit is contained in:
Dean Herbert
2019-05-16 18:55:28 +09:00
8 changed files with 39 additions and 72 deletions

View File

@ -65,7 +65,7 @@ namespace osu.Game.Tests.Chat
}
[Test]
public void TestCaseInsensitiveLinks()
public void TestInsensitiveLinks()
{
Message result = MessageFormatter.FormatMessage(new Message { Content = "look: http://puu.sh/7Ggh8xcC6/asf0asd9876.NEF" });

View File

@ -9,9 +9,9 @@ using osuTK.Graphics;
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestCaseLoadingAnimation : GridTestScene //todo: this should be an OsuTestScene
public class TestSceneLoadingAnimation : GridTestScene //todo: this should be an OsuTestScene
{
public TestCaseLoadingAnimation()
public TestSceneLoadingAnimation()
: base(2, 2)
{
LoadingAnimation loading;

View File

@ -13,7 +13,7 @@ using osu.Game.Tests.Resources;
namespace osu.Game.Tests
{
/// <summary>
/// A <see cref="WorkingBeatmap"/> that is used for testcases that include waveforms.
/// A <see cref="WorkingBeatmap"/> that is used for test scenes that include waveforms.
/// </summary>
public class WaveformTestBeatmap : WorkingBeatmap
{

View File

@ -30,6 +30,7 @@ namespace osu.Game.Graphics.UserInterface
Height = 40;
TextContainer.Height = 0.5f;
CornerRadius = 5;
LengthLimit = 1000;
Current.DisabledChanged += disabled => { Alpha = disabled ? 0.3f : 1; };
}

View File

@ -15,6 +15,7 @@ using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics.Containers;
namespace osu.Game.Overlays.Direct
{
@ -119,28 +120,16 @@ namespace osu.Game.Overlays.Direct
},
Children = new Drawable[]
{
new FillFlowContainer
new LinkFlowContainer(s =>
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Children = new[]
{
new OsuSpriteText
{
Text = "mapped by ",
Font = OsuFont.GetFont(size: 14),
Shadow = false,
Colour = colours.Gray5,
},
new OsuSpriteText
{
Text = SetInfo.Metadata.Author.Username,
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true),
Shadow = false,
Colour = colours.BlueDark,
},
},
},
s.Shadow = false;
s.Font = OsuFont.GetFont(size: 14);
}).With(d =>
{
d.AutoSizeAxes = Axes.Both;
d.AddText("mapped by ", t => t.Colour = colours.Gray5);
d.AddUserLink(SetInfo.Metadata.Author);
}),
new Container
{
AutoSizeAxes = Axes.X,

View File

@ -15,6 +15,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics.Containers;
namespace osu.Game.Overlays.Direct
{
@ -86,8 +87,9 @@ namespace osu.Game.Overlays.Direct
{
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
Size = new Vector2(height / 2),
Size = new Vector2(height / 3),
FillMode = FillMode.Fit,
Margin = new MarginPadding { Right = 10 },
},
new FillFlowContainer
{
@ -150,7 +152,7 @@ namespace osu.Game.Overlays.Direct
Child = new DownloadButton(SetInfo)
{
Size = new Vector2(height - vertical_padding * 3),
Margin = new MarginPadding { Left = vertical_padding, Right = vertical_padding },
Margin = new MarginPadding { Left = vertical_padding * 2, Right = vertical_padding },
},
},
new FillFlowContainer
@ -163,26 +165,21 @@ namespace osu.Game.Overlays.Direct
{
new Statistic(FontAwesome.Solid.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0),
new Statistic(FontAwesome.Solid.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
new FillFlowContainer
new LinkFlowContainer(s =>
{
s.Shadow = false;
s.Font = OsuFont.GetFont(size: 14);
})
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Children = new[]
{
new OsuSpriteText
{
Text = "mapped by ",
Font = OsuFont.GetFont(size: 14)
},
new OsuSpriteText
{
Text = SetInfo.Metadata.Author.Username,
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true)
},
},
},
}.With(d =>
{
d.AutoSizeAxes = Axes.Both;
d.AddText("mapped by ");
d.AddUserLink(SetInfo.Metadata.Author);
}),
new OsuSpriteText
{
Text = SetInfo.Metadata.Source,

View File

@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
{
private readonly BeatmapInfo beatmap;
private readonly int playCount;
private OsuHoverContainer mapperContainer;
public DrawableMostPlayedRow(BeatmapInfo beatmap, int playCount)
{
@ -34,36 +33,20 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
CoverType = BeatmapSetCoverType.List,
};
[BackgroundDependencyLoader(true)]
private void load(UserProfileOverlay profileOverlay)
[BackgroundDependencyLoader]
private void load()
{
LeftFlowContainer.Add(new BeatmapMetadataContainer(beatmap));
LeftFlowContainer.Add(new FillFlowContainer
LeftFlowContainer.Add(new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: 12))
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Horizontal,
Children = new Drawable[]
{
new OsuSpriteText
{
Text = @"mapped by ",
Font = OsuFont.GetFont(size: 12)
},
mapperContainer = new OsuHoverContainer
{
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
new OsuSpriteText
{
Text = beatmap.Metadata.AuthorString,
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Medium, italics: true)
}
}
},
}
});
}.With(d =>
{
d.AddText("mapped by ");
d.AddUserLink(beatmap.Metadata.Author);
}));
RightFlowContainer.Add(new FillFlowContainer
{
@ -89,9 +72,6 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
},
}
});
if (profileOverlay != null)
mapperContainer.Action = () => profileOverlay.ShowUser(beatmap.BeatmapSet.Metadata.Author);
}
}
}

View File

@ -85,7 +85,7 @@ namespace osu.Game.Tests.Visual
protected override void LoadAsyncComplete()
{
// this has to be run here rather than LoadComplete because
// TestCase.cs is checking the IsLoaded state (on another thread) and expects
// TestScene.cs is checking the IsLoaded state (on another thread) and expects
// the runner to be loaded at that point.
Add(runner = new TestSceneTestRunner.TestRunner());
}