mirror of
https://github.com/ppy/osu
synced 2024-12-26 08:53:10 +00:00
88 lines
2.7 KiB
C#
88 lines
2.7 KiB
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using OpenTK;
|
|
using OpenTK.Graphics;
|
|
using osu.Framework.Extensions.Color4Extensions;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Framework.Graphics.Shapes;
|
|
using osu.Game.Graphics;
|
|
using osu.Game.Graphics.Containers;
|
|
using osu.Game.Graphics.Sprites;
|
|
using osu.Game.Overlays.Changelog;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace osu.Game.Overlays
|
|
{
|
|
public class ChangelogOverlay : WaveOverlayContainer
|
|
{
|
|
private readonly ScrollContainer scroll;
|
|
|
|
public ChangelogHeader header;
|
|
|
|
public ChangelogOverlay()
|
|
{
|
|
Waves.FirstWaveColour = OsuColour.Gray(0.4f);
|
|
Waves.SecondWaveColour = OsuColour.Gray(0.3f);
|
|
Waves.ThirdWaveColour = OsuColour.Gray(0.2f);
|
|
Waves.FourthWaveColour = OsuColour.Gray(0.1f);
|
|
|
|
Anchor = Anchor.TopCentre;
|
|
Origin = Anchor.TopCentre;
|
|
RelativeSizeAxes = Axes.Both;
|
|
Width = 0.85f;
|
|
|
|
Masking = true;
|
|
EdgeEffect = new EdgeEffectParameters
|
|
{
|
|
Colour = Color4.Black.Opacity(0),
|
|
Type = EdgeEffectType.Shadow,
|
|
Radius = 3,
|
|
Offset = new Vector2(0f, 1f),
|
|
};
|
|
|
|
Children = new Drawable[]
|
|
{
|
|
new Box
|
|
{
|
|
RelativeSizeAxes = Axes.Both,
|
|
Colour = new Color4(20, 18, 23, 255)
|
|
},
|
|
scroll = new ScrollContainer
|
|
{
|
|
RelativeSizeAxes = Axes.Both,
|
|
ScrollbarVisible = false,
|
|
Child = new ReverseChildIDFillFlowContainer<Drawable>
|
|
{
|
|
RelativeSizeAxes = Axes.X,
|
|
AutoSizeAxes = Axes.Y,
|
|
Direction = FillDirection.Vertical,
|
|
Children = new Drawable[]
|
|
{
|
|
header = new ChangelogHeader(),
|
|
},
|
|
},
|
|
},
|
|
};
|
|
}
|
|
|
|
// receive input outside our bounds so we can trigger a close event on ourselves.
|
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
|
|
|
|
protected override void PopIn()
|
|
{
|
|
base.PopIn();
|
|
FadeEdgeEffectTo(0.25f, WaveContainer.APPEAR_DURATION, Easing.In);
|
|
}
|
|
|
|
protected override void PopOut()
|
|
{
|
|
base.PopOut();
|
|
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out);
|
|
}
|
|
}
|
|
}
|