Exemple #1
0
        private void load(OsuColour colours)
        {
            Header.Title       = FirstRunSetupOverlayStrings.FirstRunSetupTitle;
            Header.Description = FirstRunSetupOverlayStrings.FirstRunSetupDescription;

            MainAreaContent.AddRange(new Drawable[]
            {
                content = new Container
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.Both,
                    Padding          = new MarginPadding
                    {
                        Horizontal = 70 * 1.2f,
                        Bottom     = 20,
                    },
                    Child = new InputBlockingContainer
                    {
                        Masking          = true,
                        CornerRadius     = 14,
                        RelativeSizeAxes = Axes.Both,
                        Children         = new Drawable[]
                        {
                            new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                Colour           = ColourProvider.Background6,
                            },
                            stackContainer = new Container
                            {
                                Anchor           = Anchor.Centre,
                                Origin           = Anchor.Centre,
                                RelativeSizeAxes = Axes.Both,
                                Padding          = new MarginPadding
                                {
                                    Vertical   = 20,
                                    Horizontal = 70,
                                },
                            }
                        },
                    },
                },
            });

            FooterContent.Add(new GridContainer
            {
                RelativeSizeAxes = Axes.X,
                AutoSizeAxes     = Axes.Y,
                Margin           = new MarginPadding {
                    Vertical = PADDING
                },
                Anchor           = Anchor.BottomLeft,
                Origin           = Anchor.BottomLeft,
                ColumnDimensions = new[]
                {
                    new Dimension(GridSizeMode.Absolute, 10),
                    new Dimension(GridSizeMode.AutoSize),
                    new Dimension(),
                    new Dimension(GridSizeMode.Absolute, 10),
                },
                RowDimensions = new[]
                {
                    new Dimension(GridSizeMode.AutoSize),
                },
                Content = new[]
                {
                    new[]
                    {
                        Empty(),
                        BackButton = new ShearedButton(300)
                        {
                            Text          = CommonStrings.Back,
                            Action        = showPreviousStep,
                            Enabled       = { Value = false },
                            DarkerColour  = colours.Pink2,
                            LighterColour = colours.Pink1,
                        },
                        NextButton = new ShearedButton(0)
                        {
                            RelativeSizeAxes = Axes.X,
                            Width            = 1,
                            Text             = FirstRunSetupOverlayStrings.GetStarted,
                            DarkerColour     = ColourProvider.Colour2,
                            LighterColour    = ColourProvider.Colour1,
                            Action           = showNextStep
                        },
                        Empty(),
                    },
                }
            });
        }
Exemple #2
0
        private void load(OsuColour colours, LegacyImportManager?legacyImportManager)
        {
            steps.Add(typeof(ScreenWelcome));
            steps.Add(typeof(ScreenUIScale));
            steps.Add(typeof(ScreenBeatmaps));
            if (legacyImportManager?.SupportsImportFromStable == true)
            {
                steps.Add(typeof(ScreenImportFromStable));
            }
            steps.Add(typeof(ScreenBehaviour));

            Header.Title       = FirstRunSetupOverlayStrings.FirstRunSetupTitle;
            Header.Description = FirstRunSetupOverlayStrings.FirstRunSetupDescription;

            MainAreaContent.AddRange(new Drawable[]
            {
                content = new PopoverContainer
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.Both,
                    Padding          = new MarginPadding {
                        Bottom = 20,
                    },
                    Child = new GridContainer
                    {
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        RelativeSizeAxes = Axes.Both,
                        ColumnDimensions = new[]
                        {
                            new Dimension(),
                            new Dimension(minSize: 640, maxSize: 800),
                            new Dimension(),
                        },
                        Content = new[]
                        {
                            new[]
                            {
                                Empty(),
                                new InputBlockingContainer
                                {
                                    Masking          = true,
                                    CornerRadius     = 14,
                                    RelativeSizeAxes = Axes.Both,
                                    Children         = new Drawable[]
                                    {
                                        new Box
                                        {
                                            RelativeSizeAxes = Axes.Both,
                                            Colour           = ColourProvider.Background6,
                                        },
                                        loading = new LoadingSpinner(),
                                        new Container
                                        {
                                            RelativeSizeAxes = Axes.Both,
                                            Padding          = new MarginPadding {
                                                Vertical = 20
                                            },
                                            Child = screenContent = new Container {
                                                RelativeSizeAxes = Axes.Both,
                                            },
                                        },
                                    },
                                },
                                Empty(),
                            },
                        }
                    }
                },
            });

            FooterContent.Add(new GridContainer
            {
                RelativeSizeAxes = Axes.X,
                AutoSizeAxes     = Axes.Y,
                Margin           = new MarginPadding {
                    Vertical = PADDING
                },
                Anchor           = Anchor.BottomLeft,
                Origin           = Anchor.BottomLeft,
                ColumnDimensions = new[]
                {
                    new Dimension(GridSizeMode.Absolute, 10),
                    new Dimension(GridSizeMode.AutoSize),
                    new Dimension(),
                    new Dimension(GridSizeMode.Absolute, 10),
                },
                RowDimensions = new[]
                {
                    new Dimension(GridSizeMode.AutoSize),
                },
                Content = new[]
                {
                    new[]
                    {
                        Empty(),
                        BackButton = new ShearedButton(300)
                        {
                            Text          = CommonStrings.Back,
                            Action        = showPreviousStep,
                            Enabled       = { Value = false },
                            DarkerColour  = colours.Pink2,
                            LighterColour = colours.Pink1,
                        },
                        NextButton = new ShearedButton(0)
                        {
                            RelativeSizeAxes = Axes.X,
                            Width            = 1,
                            Text             = FirstRunSetupOverlayStrings.GetStarted,
                            DarkerColour     = ColourProvider.Colour2,
                            LighterColour    = ColourProvider.Colour1,
                            Action           = showNextStep
                        },
                        Empty(),
                    },
                }
            });
        }