mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:03:01 +08:00
Add NewsContent class and fix broken reference.
This commit is contained in:
parent
7d18132e61
commit
840d4741da
16
osu.Game/Overlays/News/NewsContent.cs
Normal file
16
osu.Game/Overlays/News/NewsContent.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Overlays.News
|
||||
{
|
||||
public abstract class NewsContent : FillFlowContainer
|
||||
{
|
||||
public NewsContent()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
Direction = FillDirection.Vertical;
|
||||
Padding = new MarginPadding { Bottom = 100 };
|
||||
}
|
||||
}
|
||||
}
|
@ -97,7 +97,7 @@ namespace osu.Game.Overlays.News
|
||||
IsReadingArticle = false;
|
||||
}
|
||||
|
||||
protected override Drawable CreateIcon() => new ScreenTitleIcon(@"Icons/news");
|
||||
protected override Drawable CreateIcon() => new ScreenTitleTextureIcon(@"Icons/news");
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
|
@ -15,6 +15,7 @@ namespace osu.Game.Overlays
|
||||
public class NewsOverlay : FullscreenOverlay
|
||||
{
|
||||
private NewsHeader header;
|
||||
private Container<NewsContent> content;
|
||||
|
||||
public readonly Bindable<string> Current = new Bindable<string>(null);
|
||||
|
||||
@ -39,13 +40,20 @@ namespace osu.Game.Overlays
|
||||
Children = new Drawable[]
|
||||
{
|
||||
header = new NewsHeader()
|
||||
{
|
||||
ShowFrontPage = ShowFrontPage
|
||||
},
|
||||
content = new Container<NewsContent>()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
header.Current.BindTo(Current);
|
||||
header.ShowFrontPage = ShowFrontPage;
|
||||
Current.TriggerChange();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user