Пример #1
0
        private void load(OsuColour colours)
        {
            Children = new Drawable[]
            {
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = Colour4.Black,
                    Alpha            = background_alpha,
                },
                new FillFlowContainer
                {
                    RelativeSizeAxes = Axes.X,
                    AutoSizeAxes     = Axes.Y,
                    Direction        = FillDirection.Vertical,
                    Spacing          = new Vector2(0, 50),
                    Origin           = Anchor.Centre,
                    Anchor           = Anchor.Centre,
                    Children         = new Drawable[]
                    {
                        new FillFlowContainer
                        {
                            Origin           = Anchor.TopCentre,
                            Anchor           = Anchor.TopCentre,
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Direction        = FillDirection.Vertical,
                            Spacing          = new Vector2(0, 20),
                            Children         = new Drawable[]
                            {
                                new OsuSpriteText
                                {
                                    Text         = Header,
                                    Font         = OsuFont.GetFont(size: 30),
                                    Spacing      = new Vector2(5, 0),
                                    Origin       = Anchor.TopCentre,
                                    Anchor       = Anchor.TopCentre,
                                    Colour       = colours.Yellow,
                                    Shadow       = true,
                                    ShadowColour = new Colour4(0, 0, 0, 0.25f)
                                },
                                new OsuSpriteText
                                {
                                    Text         = Description,
                                    Origin       = Anchor.TopCentre,
                                    Anchor       = Anchor.TopCentre,
                                    Shadow       = true,
                                    ShadowColour = new Colour4(0, 0, 0, 0.25f)
                                }
                            }
                        },
                        InternalButtons = new SelectionCycleFillFlowContainer <DialogButton>
                        {
                            Origin           = Anchor.TopCentre,
                            Anchor           = Anchor.TopCentre,
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Direction        = FillDirection.Vertical,
                            Masking          = true,
                            EdgeEffect       = new EdgeEffectParameters
                            {
                                Type   = EdgeEffectType.Shadow,
                                Colour = Colour4.Black.Opacity(0.6f),
                                Radius = 50
                            },
                        },
                        retryCounterContainer = new FillFlowContainer
                        {
                            Origin       = Anchor.TopCentre,
                            Anchor       = Anchor.TopCentre,
                            AutoSizeAxes = Axes.Both,
                        }
                    }
                },
            };

            State.ValueChanged += s => InternalButtons.Deselect();

            updateRetryCount();
        }
Пример #2
0
        protected GameplayMenuOverlay()
        {
            RelativeSizeAxes = Axes.Both;

            State.ValueChanged += s => InternalButtons.Deselect();
        }