<commit_before>﻿// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Changelog.Header;
using osu.Game.Graphics;
using osuTK;
using osuTK.Graphics;

namespace osu.Game.Overlays.Changelog
{
    public class ChangelogHeader : Container
    {
        private OsuSpriteText titleStream;
        private BreadcrumbListing listing;
        private SpriteIcon chevron;
        private BreadcrumbRelease releaseStream;

        public delegate void ListingSelectedEventHandler();

        public event ListingSelectedEventHandler ListingSelected;

        private const float cover_height = 150;
        private const float title_height = 50;
        private const float icon_size = 50;
        private const float icon_margin = 20;
        private const float version_height = 40;

        [BackgroundDependencyLoader]
        private void load(OsuColour colours, TextureStore textures)
        {
            RelativeSizeAxes = Axes.X;
            Height = cover_height;

            Children = new Drawable[]
            {
                new Container
                {
                    RelativeSizeAxes = Axes.X,
                    Height = cover_height,
                    Masking = true,
                    Children = new Drawable[]
                    {
                        new Sprite
                        {
                            RelativeSizeAxes = Axes.Both,
                            Texture = textures.Get(@"https://osu.ppy.sh/images/headers/changelog.jpg"),
                            FillMode = FillMode.Fill,
                        },
                    }
                },
                new Container
                {
                    Height = title_height,
                    Anchor = Anchor.BottomLeft,
                    Origin = Anchor.BottomLeft,
                    Y = -version_height,
                    Children = new Drawable[]
                    {
                        new CircularContainer
                        {
                            X = icon_margin,
                            Masking = true,
                            BorderColour = colours.Violet,
                            BorderThickness = 3,
                            MaskingSmoothness = 1,
                            Size = new Vector2(50),
                            Children = new Drawable[]
                            {
                                new Sprite
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    // todo: https://osu.ppy.sh/images/icons/changelog.svg
                                    Texture = textures.Get(@"https://i.imgur.com/HQM3Vhp.png"),<commit_msg>Move resources to osu-resources<commit_after>// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Changelog.Header;
using osu.Game.Graphics;
using osuTK;
using osuTK.Graphics;

namespace osu.Game.Overlays.Changelog
{
    public class ChangelogHeader : Container
    {
        private OsuSpriteText titleStream;
        private BreadcrumbListing listing;
        private SpriteIcon chevron;
        private BreadcrumbRelease releaseStream;

        public delegate void ListingSelectedEventHandler();

        public event ListingSelectedEventHandler ListingSelected;

        private const float cover_height = 150;
        private const float title_height = 50;
        private const float icon_size = 50;
        private const float icon_margin = 20;
        private const float version_height = 40;

        [BackgroundDependencyLoader]
        private void load(OsuColour colours, TextureStore textures)
        {
            RelativeSizeAxes = Axes.X;
            Height = cover_height;

            Children = new Drawable[]
            {
                new Container
                {
                    RelativeSizeAxes = Axes.X,
                    Height = cover_height,
                    Masking = true,
                    Children = new Drawable[]
                    {
                        new Sprite
                        {
                            RelativeSizeAxes = Axes.Both,
                            Texture = textures.Get(@"Headers/changelog"),
                            FillMode = FillMode.Fill,
                        },
                    }
                },
                new Container
                {
                    Height = title_height,
                    Anchor = Anchor.BottomLeft,
                    Origin = Anchor.BottomLeft,
                    Y = -version_height,
                    Children = new Drawable[]
                    {
                        new CircularContainer
                        {
                            X = icon_margin,
                            Masking = true,
                            BorderColour = colours.Violet,
                            BorderThickness = 3,
                            MaskingSmoothness = 1,
                            Size = new Vector2(50),
                            Children = new Drawable[]
                            {
                                new Sprite
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Texture = textures.Get(@"Icons/changelog"),
{'fraction_non_alphanumeric': 0.06266666666666666, 'fraction_numerical': 0.0055, 'mean_word_length': 1.2176644493717665, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6711461', 'n_tokens_mistral': 1510, 'n_tokens_neox': 1357, 'n_words': 338}