예제 #1
0
        public BeatmapTypeInfo()
        {
            AutoSizeAxes   = Axes.Both;
            Direction      = FillDirection.Horizontal;
            LayoutDuration = 100;
            Spacing        = new Vector2(5f, 0f);

            Children = new Drawable[]
            {
                modeTypeInfo = new ModeTypeInfo(),
                new Container
                {
                    AutoSizeAxes = Axes.X,
                    Height       = 30,
                    Margin       = new MarginPadding {
                        Left = 5
                    },
                    Children = new Drawable[]
                    {
                        beatmapTitle  = new BeatmapTitle(),
                        beatmapAuthor = new OsuSpriteText
                        {
                            Anchor   = Anchor.BottomLeft,
                            Origin   = Anchor.BottomLeft,
                            TextSize = 14,
                        },
                    },
                },
            };
        }
예제 #2
0
        public BeatmapTypeInfo()
        {
            AutoSizeAxes = Axes.Both;

            BeatmapTitle      beatmapTitle;
            ModeTypeInfo      modeTypeInfo;
            LinkFlowContainer beatmapAuthor;

            InternalChild = new FillFlowContainer
            {
                AutoSizeAxes   = Axes.Both,
                Direction      = FillDirection.Horizontal,
                LayoutDuration = 100,
                Spacing        = new Vector2(5, 0),
                Children       = new Drawable[]
                {
                    modeTypeInfo = new ModeTypeInfo(),
                    new Container
                    {
                        AutoSizeAxes = Axes.X,
                        Height       = 30,
                        Margin       = new MarginPadding {
                            Left = 5
                        },
                        Children = new Drawable[]
                        {
                            beatmapTitle  = new BeatmapTitle(),
                            beatmapAuthor = new LinkFlowContainer(s => s.TextSize = 14)
                            {
                                Anchor       = Anchor.BottomLeft,
                                Origin       = Anchor.BottomLeft,
                                AutoSizeAxes = Axes.Both
                            },
                        },
                    },
                }
            };

            modeTypeInfo.Beatmap.BindTo(Beatmap);
            modeTypeInfo.Ruleset.BindTo(Ruleset);
            modeTypeInfo.Type.BindTo(Type);

            beatmapTitle.Beatmap.BindTo(Beatmap);

            Beatmap.BindValueChanged(v =>
            {
                beatmapAuthor.Clear();

                if (v != null)
                {
                    beatmapAuthor.AddText("mapped by ", s => s.Colour = OsuColour.Gray(0.8f));
                    beatmapAuthor.AddLink(v.Metadata.Author.Username, null, LinkAction.OpenUserProfile, v.Metadata.Author.Id.ToString(), "View Profile");
                }
            });
        }
        private void load(OsuColour colours, LocalisationEngine localisation)
        {
            Box             sideStrip;
            Container       coverContainer;
            OsuSpriteText   name, status, beatmapTitle, beatmapDash, beatmapArtist;
            ParticipantInfo participantInfo;
            ModeTypeInfo    modeTypeInfo;

            Children = new Drawable[]
            {
                selectionBox,
                new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Padding          = new MarginPadding(selection_border_width),
                    Child            = new Container
                    {
                        RelativeSizeAxes = Axes.Both,
                        Masking          = true,
                        CornerRadius     = corner_radius,
                        EdgeEffect       = new EdgeEffectParameters
                        {
                            Type   = EdgeEffectType.Shadow,
                            Colour = Color4.Black.Opacity(40),
                            Radius = 5,
                        },
                        Children = new Drawable[]
                        {
                            new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                Colour           = OsuColour.FromHex(@"212121"),
                            },
                            sideStrip = new Box
                            {
                                RelativeSizeAxes = Axes.Y,
                                Width            = side_strip_width,
                            },
                            new Container
                            {
                                Width            = cover_width,
                                RelativeSizeAxes = Axes.Y,
                                Masking          = true,
                                Margin           = new MarginPadding {
                                    Left = side_strip_width
                                },
                                Children = new Drawable[]
                                {
                                    new Box
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Colour           = Color4.Black,
                                    },
                                    coverContainer = new Container
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                    },
                                },
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Padding          = new MarginPadding
                                {
                                    Vertical = content_padding,
                                    Left     = side_strip_width + cover_width + content_padding,
                                    Right    = content_padding,
                                },
                                Children = new Drawable[]
                                {
                                    new FillFlowContainer
                                    {
                                        RelativeSizeAxes = Axes.X,
                                        AutoSizeAxes     = Axes.Y,
                                        Direction        = FillDirection.Vertical,
                                        Spacing          = new Vector2(5f),
                                        Children         = new Drawable[]
                                        {
                                            name = new OsuSpriteText
                                            {
                                                TextSize = 18,
                                            },
                                            participantInfo = new ParticipantInfo(),
                                        },
                                    },
                                    new FillFlowContainer
                                    {
                                        Anchor           = Anchor.BottomLeft,
                                        Origin           = Anchor.BottomLeft,
                                        RelativeSizeAxes = Axes.X,
                                        AutoSizeAxes     = Axes.Y,
                                        Direction        = FillDirection.Vertical,
                                        Children         = new Drawable[]
                                        {
                                            status = new OsuSpriteText
                                            {
                                                TextSize = 14,
                                                Font     = @"Exo2.0-Bold",
                                            },
                                            new FillFlowContainer <OsuSpriteText>
                                            {
                                                RelativeSizeAxes = Axes.X,
                                                AutoSizeAxes     = Axes.Y,
                                                Colour           = colours.Gray9,
                                                Direction        = FillDirection.Horizontal,
                                                Children         = new[]
                                                {
                                                    beatmapTitle = new OsuSpriteText
                                                    {
                                                        TextSize = 14,
                                                        Font     = @"Exo2.0-BoldItalic",
                                                    },
                                                    beatmapDash = new OsuSpriteText
                                                    {
                                                        TextSize = 14,
                                                        Font     = @"Exo2.0-BoldItalic",
                                                    },
                                                    beatmapArtist = new OsuSpriteText
                                                    {
                                                        TextSize = 14,
                                                        Font     = @"Exo2.0-RegularItalic",
                                                    },
                                                },
                                            },
                                        },
                                    },
                                    modeTypeInfo = new ModeTypeInfo
                                    {
                                        Anchor = Anchor.BottomRight,
                                        Origin = Anchor.BottomRight,
                                    },
                                },
                            },
                        },
                    },
                },
            };

            nameBind.ValueChanged         += n => name.Text = n;
            hostBind.ValueChanged         += h => participantInfo.Host = h;
            typeBind.ValueChanged         += m => modeTypeInfo.Type = m;
            participantsBind.ValueChanged += p => participantInfo.Participants = p;

            statusBind.ValueChanged += s =>
            {
                status.Text = s.Message;

                foreach (Drawable d in new Drawable[] { selectionBox, sideStrip, status })
                {
                    d.FadeColour(s.GetAppropriateColour(colours), 100);
                }
            };

            beatmapBind.ValueChanged += b =>
            {
                modeTypeInfo.Beatmap = b;

                if (b != null)
                {
                    coverContainer.FadeIn(transition_duration);

                    LoadComponentAsync(new BeatmapSetCover(b.BeatmapSet)
                    {
                        Anchor         = Anchor.Centre,
                        Origin         = Anchor.Centre,
                        FillMode       = FillMode.Fill,
                        OnLoadComplete = d => d.FadeInFromZero(400, Easing.Out),
                    }, coverContainer.Add);

                    beatmapTitle.Current  = localisation.GetUnicodePreference(b.Metadata.TitleUnicode, b.Metadata.Title);
                    beatmapDash.Text      = @" - ";
                    beatmapArtist.Current = localisation.GetUnicodePreference(b.Metadata.ArtistUnicode, b.Metadata.Artist);
                }
                else
                {
                    coverContainer.FadeOut(transition_duration);

                    beatmapTitle.Current  = null;
                    beatmapArtist.Current = null;

                    beatmapTitle.Text = "Changing map";
                    beatmapDash.Text  = beatmapArtist.Text = string.Empty;
                }
            };

            nameBind.BindTo(Room.Name);
            hostBind.BindTo(Room.Host);
            statusBind.BindTo(Room.Status);
            typeBind.BindTo(Room.Type);
            beatmapBind.BindTo(Room.Beatmap);
            participantsBind.BindTo(Room.Participants);
        }
예제 #4
0
        private void load(OsuColour colours)
        {
            Box sideStrip;
            UpdateableBeatmapSetCover cover;
            OsuSpriteText             name, status;
            ParticipantInfo           participantInfo;
            BeatmapTitle beatmapTitle;
            ModeTypeInfo modeTypeInfo;

            Children = new Drawable[]
            {
                selectionBox,
                new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Padding          = new MarginPadding(SELECTION_BORDER_WIDTH),
                    Child            = new Container
                    {
                        RelativeSizeAxes = Axes.Both,
                        Masking          = true,
                        CornerRadius     = corner_radius,
                        EdgeEffect       = new EdgeEffectParameters
                        {
                            Type   = EdgeEffectType.Shadow,
                            Colour = Color4.Black.Opacity(40),
                            Radius = 5,
                        },
                        Children = new Drawable[]
                        {
                            new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                Colour           = OsuColour.FromHex(@"212121"),
                            },
                            sideStrip = new Box
                            {
                                RelativeSizeAxes = Axes.Y,
                                Width            = side_strip_width,
                            },
                            cover = new UpdateableBeatmapSetCover
                            {
                                Width            = cover_width,
                                RelativeSizeAxes = Axes.Y,
                                Masking          = true,
                                Margin           = new MarginPadding {
                                    Left = side_strip_width
                                },
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Padding          = new MarginPadding
                                {
                                    Vertical = content_padding,
                                    Left     = side_strip_width + cover_width + content_padding,
                                    Right    = content_padding,
                                },
                                Children = new Drawable[]
                                {
                                    new FillFlowContainer
                                    {
                                        RelativeSizeAxes = Axes.X,
                                        AutoSizeAxes     = Axes.Y,
                                        Direction        = FillDirection.Vertical,
                                        Spacing          = new Vector2(5f),
                                        Children         = new Drawable[]
                                        {
                                            name = new OsuSpriteText
                                            {
                                                TextSize = 18,
                                            },
                                            participantInfo = new ParticipantInfo(),
                                        },
                                    },
                                    new FillFlowContainer
                                    {
                                        Anchor           = Anchor.BottomLeft,
                                        Origin           = Anchor.BottomLeft,
                                        RelativeSizeAxes = Axes.X,
                                        AutoSizeAxes     = Axes.Y,
                                        Direction        = FillDirection.Vertical,
                                        Children         = new Drawable[]
                                        {
                                            status = new OsuSpriteText
                                            {
                                                TextSize = 14,
                                                Font     = @"Exo2.0-Bold",
                                            },
                                            beatmapTitle = new BeatmapTitle
                                            {
                                                TextSize = 14,
                                                Colour   = colours.Gray9
                                            },
                                        },
                                    },
                                    modeTypeInfo = new ModeTypeInfo
                                    {
                                        Anchor = Anchor.BottomRight,
                                        Origin = Anchor.BottomRight,
                                    },
                                },
                            },
                        },
                    },
                },
            };

            nameBind.ValueChanged         += n => name.Text = n;
            hostBind.ValueChanged         += h => participantInfo.Host = h;
            typeBind.ValueChanged         += m => modeTypeInfo.Type = m;
            participantsBind.ValueChanged += p => participantInfo.Participants = p;

            statusBind.ValueChanged += s =>
            {
                status.Text = s.Message;

                foreach (Drawable d in new Drawable[] { selectionBox, sideStrip, status })
                {
                    d.FadeColour(s.GetAppropriateColour(colours), transition_duration);
                }
            };

            beatmapBind.ValueChanged += b =>
            {
                cover.BeatmapSet     = b?.BeatmapSet;
                beatmapTitle.Beatmap = b;
                modeTypeInfo.Beatmap = b;
            };

            nameBind.BindTo(Room.Name);
            hostBind.BindTo(Room.Host);
            statusBind.BindTo(Room.Status);
            typeBind.BindTo(Room.Type);
            beatmapBind.BindTo(Room.Beatmap);
            participantsBind.BindTo(Room.Participants);
        }
예제 #5
0
        public RoomInspector()
        {
            Width            = 520;
            RelativeSizeAxes = Axes.Y;

            Children = new Drawable[]
            {
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = OsuColour.FromHex(@"343138"),
                },
                topFlow = new FillFlowContainer
                {
                    RelativeSizeAxes = Axes.X,
                    AutoSizeAxes     = Axes.Y,
                    Direction        = FillDirection.Vertical,
                    Children         = new Drawable[]
                    {
                        new Container
                        {
                            RelativeSizeAxes = Axes.X,
                            Height           = 200,
                            Masking          = true,
                            Children         = new Drawable[]
                            {
                                new Container
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Children         = new Drawable[]
                                    {
                                        new Box
                                        {
                                            RelativeSizeAxes = Axes.Both,
                                            Colour           = Color4.Black,
                                        },
                                        coverContainer = new Container
                                        {
                                            RelativeSizeAxes = Axes.Both,
                                        },
                                    },
                                },
                                new Box
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Colour           = ColourInfo.GradientVertical(Color4.Black.Opacity(0.5f), Color4.Black.Opacity(0)),
                                },
                                new Container
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Padding          = new MarginPadding(20),
                                    Children         = new Drawable[]
                                    {
                                        new FillFlowContainer
                                        {
                                            Anchor         = Anchor.TopRight,
                                            Origin         = Anchor.TopRight,
                                            AutoSizeAxes   = Axes.Both,
                                            Direction      = FillDirection.Horizontal,
                                            LayoutDuration = transition_duration,
                                            Children       = new[]
                                            {
                                                participants = new OsuSpriteText
                                                {
                                                    TextSize = 30,
                                                    Font     = @"Exo2.0-Bold"
                                                },
                                                participantsSlash = new OsuSpriteText
                                                {
                                                    Text     = @"/",
                                                    TextSize = 30,
                                                    Font     = @"Exo2.0-Light"
                                                },
                                                maxParticipants = new OsuSpriteText
                                                {
                                                    TextSize = 30,
                                                    Font     = @"Exo2.0-Light"
                                                },
                                            },
                                        },
                                        name = new OsuSpriteText
                                        {
                                            Anchor   = Anchor.BottomLeft,
                                            Origin   = Anchor.BottomLeft,
                                            TextSize = 30,
                                        },
                                    },
                                },
                            },
                        },
                        statusStrip = new Box
                        {
                            RelativeSizeAxes = Axes.X,
                            Height           = 5,
                        },
                        new Container
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Children         = new Drawable[]
                            {
                                new Box
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Colour           = OsuColour.FromHex(@"28242d"),
                                },
                                new FillFlowContainer
                                {
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Direction        = FillDirection.Vertical,
                                    Padding          = contentPadding,
                                    Spacing          = new Vector2(0f, 5f),
                                    Children         = new Drawable[]
                                    {
                                        status = new OsuSpriteText
                                        {
                                            TextSize = 14,
                                            Font     = @"Exo2.0-Bold",
                                        },
                                        new FillFlowContainer
                                        {
                                            AutoSizeAxes   = Axes.X,
                                            Height         = 30,
                                            Direction      = FillDirection.Horizontal,
                                            LayoutDuration = transition_duration,
                                            Spacing        = new Vector2(5f, 0f),
                                            Children       = new Drawable[]
                                            {
                                                modeTypeInfo = new ModeTypeInfo(),
                                                new Container
                                                {
                                                    AutoSizeAxes     = Axes.X,
                                                    RelativeSizeAxes = Axes.Y,
                                                    Margin           = new MarginPadding {
                                                        Left = 5
                                                    },
                                                    Children = new[]
                                                    {
                                                        new FillFlowContainer
                                                        {
                                                            AutoSizeAxes = Axes.Both,
                                                            Direction    = FillDirection.Horizontal,
                                                            Children     = new[]
                                                            {
                                                                beatmapTitle = new OsuSpriteText
                                                                {
                                                                    Font = @"Exo2.0-BoldItalic",
                                                                },
                                                                beatmapDash = new OsuSpriteText
                                                                {
                                                                    Font = @"Exo2.0-BoldItalic",
                                                                },
                                                                beatmapArtist = new OsuSpriteText
                                                                {
                                                                    Font = @"Exo2.0-RegularItalic",
                                                                },
                                                            },
                                                        },
                                                        beatmapAuthor = new OsuSpriteText
                                                        {
                                                            Anchor   = Anchor.BottomLeft,
                                                            Origin   = Anchor.BottomLeft,
                                                            TextSize = 14,
                                                        },
                                                    },
                                                },
                                            },
                                        },
                                    },
                                },
                            },
                        },
                        new Container
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Padding          = contentPadding,
                            Children         = new Drawable[]
                            {
                                participantInfo = new ParticipantInfo(@"Rank Range "),
                            },
                        },
                    },
                },
                participantsScroll = new OsuScrollContainer
                {
                    Anchor           = Anchor.BottomLeft,
                    Origin           = Anchor.BottomLeft,
                    RelativeSizeAxes = Axes.X,
                    Padding          = new MarginPadding {
                        Top = contentPadding.Top, Left = 38, Right = 37
                    },
                    Children = new[]
                    {
                        participantsFlow = new FillFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            LayoutDuration   = transition_duration,
                            Spacing          = new Vector2(5f),
                        },
                    },
                },
            };

            nameBind.ValueChanged            += displayName;
            hostBind.ValueChanged            += displayUser;
            typeBind.ValueChanged            += displayGameType;
            maxParticipantsBind.ValueChanged += displayMaxParticipants;
            participantsBind.ValueChanged    += displayParticipants;
        }
예제 #6
0
        public DrawableRoom(Room room)
        {
            Room = room;

            RelativeSizeAxes = Axes.X;
            Height           = height;
            CornerRadius     = 5;
            Masking          = true;
            EdgeEffect       = new EdgeEffectParameters
            {
                Type   = EdgeEffectType.Shadow,
                Colour = Color4.Black.Opacity(40),
                Radius = 5,
            };

            Children = new Drawable[]
            {
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = OsuColour.FromHex(@"212121"),
                },
                sideStrip = new Box
                {
                    RelativeSizeAxes = Axes.Y,
                    Width            = side_strip_width,
                },
                new Container
                {
                    Width            = cover_width,
                    RelativeSizeAxes = Axes.Y,
                    Masking          = true,
                    Margin           = new MarginPadding {
                        Left = side_strip_width
                    },
                    Children = new Drawable[]
                    {
                        new Box
                        {
                            RelativeSizeAxes = Axes.Both,
                            Colour           = Color4.Black,
                        },
                        coverContainer = new Container
                        {
                            RelativeSizeAxes = Axes.Both,
                        },
                    },
                },
                new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Padding          = new MarginPadding
                    {
                        Vertical = content_padding,
                        Left     = side_strip_width + cover_width + content_padding,
                        Right    = content_padding,
                    },
                    Children = new Drawable[]
                    {
                        new FillFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Direction        = FillDirection.Vertical,
                            Spacing          = new Vector2(5f),
                            Children         = new Drawable[]
                            {
                                name = new OsuSpriteText
                                {
                                    TextSize = 18,
                                },
                                participantInfo = new ParticipantInfo(),
                            },
                        },
                        new FillFlowContainer
                        {
                            Anchor           = Anchor.BottomLeft,
                            Origin           = Anchor.BottomLeft,
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Direction        = FillDirection.Vertical,
                            Children         = new Drawable[]
                            {
                                status = new OsuSpriteText
                                {
                                    TextSize = 14,
                                    Font     = @"Exo2.0-Bold",
                                },
                                beatmapInfoFlow = new FillFlowContainer <OsuSpriteText>
                                {
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Direction        = FillDirection.Horizontal,
                                    Children         = new[]
                                    {
                                        beatmapTitle = new OsuSpriteText
                                        {
                                            TextSize = 14,
                                            Font     = @"Exo2.0-BoldItalic",
                                        },
                                        beatmapDash = new OsuSpriteText
                                        {
                                            TextSize = 14,
                                            Font     = @"Exo2.0-BoldItalic",
                                        },
                                        beatmapArtist = new OsuSpriteText
                                        {
                                            TextSize = 14,
                                            Font     = @"Exo2.0-RegularItalic",
                                        },
                                    },
                                },
                            },
                        },
                        modeTypeInfo = new ModeTypeInfo
                        {
                            Anchor = Anchor.BottomRight,
                            Origin = Anchor.BottomRight,
                        },
                    },
                },
            };

            nameBind.ValueChanged         += displayName;
            hostBind.ValueChanged         += displayUser;
            typeBind.ValueChanged         += displayGameType;
            participantsBind.ValueChanged += displayParticipants;

            nameBind.BindTo(Room.Name);
            hostBind.BindTo(Room.Host);
            statusBind.BindTo(Room.Status);
            typeBind.BindTo(Room.Type);
            beatmapBind.BindTo(Room.Beatmap);
            participantsBind.BindTo(Room.Participants);
        }
예제 #7
0
        private void load(OsuColour colours, LocalisationEngine localisation)
        {
            this.colours = colours;

            ModeTypeInfo  modeTypeInfo;
            OsuSpriteText participants, participantsSlash, maxParticipants, beatmapTitle, beatmapDash, beatmapArtist, beatmapAuthor;

            Children = new Drawable[]
            {
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = OsuColour.FromHex(@"343138"),
                },
                topFlow = new FillFlowContainer
                {
                    RelativeSizeAxes = Axes.X,
                    AutoSizeAxes     = Axes.Y,
                    Direction        = FillDirection.Vertical,
                    Children         = new Drawable[]
                    {
                        new Container
                        {
                            RelativeSizeAxes = Axes.X,
                            Height           = 200,
                            Masking          = true,
                            Children         = new Drawable[]
                            {
                                new Container
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Children         = new Drawable[]
                                    {
                                        new Box
                                        {
                                            RelativeSizeAxes = Axes.Both,
                                            Colour           = Color4.Black,
                                        },
                                        coverContainer = new Container
                                        {
                                            RelativeSizeAxes = Axes.Both,
                                        },
                                    },
                                },
                                new Box
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Colour           = ColourInfo.GradientVertical(Color4.Black.Opacity(0.5f), Color4.Black.Opacity(0)),
                                },
                                new Container
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Padding          = new MarginPadding(20),
                                    Children         = new Drawable[]
                                    {
                                        participantNumbersFlow = new FillFlowContainer
                                        {
                                            Anchor         = Anchor.TopRight,
                                            Origin         = Anchor.TopRight,
                                            AutoSizeAxes   = Axes.Both,
                                            Direction      = FillDirection.Horizontal,
                                            LayoutDuration = transition_duration,
                                            Children       = new[]
                                            {
                                                participants = new OsuSpriteText
                                                {
                                                    TextSize = 30,
                                                    Font     = @"Exo2.0-Bold"
                                                },
                                                participantsSlash = new OsuSpriteText
                                                {
                                                    Text     = @"/",
                                                    TextSize = 30,
                                                    Font     = @"Exo2.0-Light"
                                                },
                                                maxParticipants = new OsuSpriteText
                                                {
                                                    TextSize = 30,
                                                    Font     = @"Exo2.0-Light"
                                                },
                                            },
                                        },
                                        name = new OsuSpriteText
                                        {
                                            Anchor   = Anchor.BottomLeft,
                                            Origin   = Anchor.BottomLeft,
                                            TextSize = 30,
                                        },
                                    },
                                },
                            },
                        },
                        statusStrip = new Box
                        {
                            RelativeSizeAxes = Axes.X,
                            Height           = 5,
                        },
                        new Container
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Children         = new Drawable[]
                            {
                                new Box
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Colour           = OsuColour.FromHex(@"28242d"),
                                },
                                new FillFlowContainer
                                {
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Direction        = FillDirection.Vertical,
                                    LayoutDuration   = transition_duration,
                                    Padding          = contentPadding,
                                    Spacing          = new Vector2(0f, 5f),
                                    Children         = new Drawable[]
                                    {
                                        status = new OsuSpriteText
                                        {
                                            TextSize = 14,
                                            Font     = @"Exo2.0-Bold",
                                        },
                                        infoPanelFlow = new FillFlowContainer
                                        {
                                            AutoSizeAxes   = Axes.X,
                                            Height         = 30,
                                            Direction      = FillDirection.Horizontal,
                                            LayoutDuration = transition_duration,
                                            Spacing        = new Vector2(5f, 0f),
                                            Children       = new Drawable[]
                                            {
                                                modeTypeInfo = new ModeTypeInfo(),
                                                new Container
                                                {
                                                    AutoSizeAxes     = Axes.X,
                                                    RelativeSizeAxes = Axes.Y,
                                                    Margin           = new MarginPadding {
                                                        Left = 5
                                                    },
                                                    Children = new[]
                                                    {
                                                        new FillFlowContainer
                                                        {
                                                            AutoSizeAxes = Axes.Both,
                                                            Direction    = FillDirection.Horizontal,
                                                            Children     = new[]
                                                            {
                                                                beatmapTitle = new OsuSpriteText
                                                                {
                                                                    Font = @"Exo2.0-BoldItalic",
                                                                },
                                                                beatmapDash = new OsuSpriteText
                                                                {
                                                                    Font = @"Exo2.0-BoldItalic",
                                                                },
                                                                beatmapArtist = new OsuSpriteText
                                                                {
                                                                    Font = @"Exo2.0-RegularItalic",
                                                                },
                                                            },
                                                        },
                                                        beatmapAuthor = new OsuSpriteText
                                                        {
                                                            Anchor   = Anchor.BottomLeft,
                                                            Origin   = Anchor.BottomLeft,
                                                            TextSize = 14,
                                                            Colour   = colours.Gray9,
                                                        },
                                                    },
                                                },
                                            },
                                        },
                                    },
                                },
                            },
                        },
                        new Container
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Padding          = contentPadding,
                            Children         = new Drawable[]
                            {
                                participantInfo = new ParticipantInfo(@"Rank Range "),
                            },
                        },
                    },
                },
                participantsScroll = new OsuScrollContainer
                {
                    Anchor           = Anchor.BottomLeft,
                    Origin           = Anchor.BottomLeft,
                    RelativeSizeAxes = Axes.X,
                    Padding          = new MarginPadding {
                        Top = contentPadding.Top, Left = 38, Right = 37
                    },
                    Children = new[]
                    {
                        participantsFlow = new FillFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            LayoutDuration   = transition_duration,
                            Spacing          = new Vector2(5f),
                        },
                    },
                },
            };

            nameBind.ValueChanged   += n => name.Text = n;
            hostBind.ValueChanged   += h => participantInfo.Host = h;
            typeBind.ValueChanged   += t => modeTypeInfo.Type = t;
            statusBind.ValueChanged += displayStatus;

            beatmapBind.ValueChanged += b =>
            {
                modeTypeInfo.Beatmap = b;

                if (b != null)
                {
                    coverContainer.FadeIn(transition_duration);

                    LoadComponentAsync(new BeatmapSetCover(b.BeatmapSet)
                    {
                        RelativeSizeAxes = Axes.Both,
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        FillMode         = FillMode.Fill,
                        OnLoadComplete   = d => d.FadeInFromZero(400, Easing.Out),
                    }, coverContainer.Add);

                    beatmapTitle.Current  = localisation.GetUnicodePreference(b.Metadata.TitleUnicode, b.Metadata.Title);
                    beatmapDash.Text      = @" - ";
                    beatmapArtist.Current = localisation.GetUnicodePreference(b.Metadata.ArtistUnicode, b.Metadata.Artist);
                    beatmapAuthor.Text    = $"mapped by {b.Metadata.Author}";
                }
                else
                {
                    coverContainer.FadeOut(transition_duration);

                    beatmapTitle.Current  = null;
                    beatmapArtist.Current = null;

                    beatmapTitle.Text = "Changing map";
                    beatmapDash.Text  = beatmapArtist.Text = beatmapAuthor.Text = string.Empty;
                }
            };

            maxParticipantsBind.ValueChanged += m =>
            {
                if (m == null)
                {
                    participantsSlash.FadeOut(transition_duration);
                    maxParticipants.FadeOut(transition_duration);
                }
                else
                {
                    participantsSlash.FadeIn(transition_duration);
                    maxParticipants.FadeIn(transition_duration);
                    maxParticipants.Text = m.ToString();
                }
            };

            participantsBind.ValueChanged += p =>
            {
                participants.Text                   = p.Length.ToString();
                participantInfo.Participants        = p;
                participantsFlow.ChildrenEnumerable = p.Select(u => new UserTile(u));
            };

            updateState();
        }