Example #1
0
        private void load()
        {
            Origin           = Anchor.TopRight;
            Anchor           = Anchor.TopRight;
            RelativeSizeAxes = Axes.Both;
            Width            = 1 / 3f;
            Children         = new Drawable[]
            {
                shadowBox = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = Colour4.Black,
                    Alpha            = 0,
                },
                popUpContent = new Container
                {
                    Anchor               = Anchor.Centre,
                    Origin               = Anchor.Centre,
                    RelativeSizeAxes     = Axes.Both,
                    RelativePositionAxes = Axes.X,
                    X     = 1,
                    Child = new Container
                    {
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        AutoSizeAxes     = Axes.Y,
                        RelativeSizeAxes = Axes.X,
                        Width            = 3 / 4f,
                        BorderColour     = new Colour4(70, 68, 66, 255),
                        BorderThickness  = 4,
                        Masking          = true,
                        CornerRadius     = 15,
                        Children         = new Drawable[]
                        {
                            new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                Colour           = new Colour4(106, 100, 104, 255),
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.X,
                                AutoSizeAxes     = Axes.Y,
                                Padding          = new MarginPadding(50),
                                Child            = new FillFlowContainer
                                {
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Direction        = FillDirection.Vertical,
                                    Children         = new Drawable[]
                                    {
                                        new SpriteText
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Text   = @"Usuario:",
                                        },
                                        usernameBox = new BasicTextBox
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Height = 35,
                                            Width  = 380,
                                            Margin = new MarginPadding {
                                                Bottom = 20
                                            },
                                        },
                                        new SpriteText
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Text   = @"Contraseña:",
                                        },
                                        passwordBox = new BasicPasswordTextBox
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Height = 35,
                                            Width  = 380,
                                            Margin = new MarginPadding {
                                                Bottom = 50
                                            },
                                        },
                                        new Container
                                        {
                                            Origin           = Anchor.TopLeft,
                                            Anchor           = Anchor.TopLeft,
                                            RelativeSizeAxes = Axes.X,
                                            AutoSizeAxes     = Axes.Y,
                                            Child            = loginButton = new GamesToGoButton
                                            {
                                                Origin = Anchor.BottomCentre,
                                                Anchor = Anchor.BottomCentre,
                                                Text   = @"Iniciar Sesión",
                                                Width  = 100,
                                                Height = 35,
                                                Action = () => api.Login(usernameBox.Text, passwordBox.Text),
                                            },
                                        },
                                    },
                                },
                            },
                        },
                    },
                },
            };

            loginButton.Enabled.Value = false;

            passwordBox.Current.BindValueChanged(checkUserPass);
            usernameBox.Current.BindValueChanged(checkUserPass);

            localUser.BindTo(api.LocalUser);
            localUser.BindValueChanged(_ => nextScreenAction?.Invoke());
            api.Login(@"daro31", @"1234");
        }
Example #2
0
        private void load()
        {
            Origin           = Anchor.TopLeft;
            Anchor           = Anchor.TopLeft;
            RelativeSizeAxes = Axes.Both;
            Width            = 1 / 3f;
            Children         = new Drawable[]
            {
                shadowBox = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = Colour4.Black,
                    Alpha            = 0,
                },
                popUpContent = new Container
                {
                    Anchor               = Anchor.Centre,
                    Origin               = Anchor.Centre,
                    RelativeSizeAxes     = Axes.Both,
                    RelativePositionAxes = Axes.X,
                    X     = 1,
                    Child = new Container
                    {
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        AutoSizeAxes     = Axes.Y,
                        RelativeSizeAxes = Axes.X,
                        Width            = 3 / 4f,
                        BorderColour     = new Colour4(70, 68, 66, 255),
                        BorderThickness  = 4,
                        Masking          = true,
                        CornerRadius     = 15,
                        Children         = new Drawable[]
                        {
                            new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                Colour           = new Colour4(106, 100, 104, 255),
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.X,
                                AutoSizeAxes     = Axes.Y,
                                Padding          = new MarginPadding(50),
                                Child            = new FillFlowContainer
                                {
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Direction        = FillDirection.Vertical,
                                    Children         = new Drawable[]
                                    {
                                        new SpriteText
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Text   = @"Usuario:",
                                        },
                                        usernameBox = new BasicTextBox
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Height = 35,
                                            Width  = 380,
                                            Margin = new MarginPadding {
                                                Bottom = 20
                                            },
                                        },
                                        new SpriteText
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Text   = @"Correo:",
                                        },
                                        emailBox = new BasicTextBox
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Height = 35,
                                            Width  = 380,
                                            Margin = new MarginPadding {
                                                Bottom = 20
                                            },
                                        },
                                        new SpriteText
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Text   = @"Contraseña:",
                                        },
                                        passwordBox = new BasicPasswordTextBox
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Height = 35,
                                            Width  = 380,
                                            Margin = new MarginPadding {
                                                Bottom = 20
                                            },
                                        },
                                        new SpriteText
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Text   = @"Verificar Contraseña:",
                                        },
                                        confirmPasswordBox = new BasicPasswordTextBox
                                        {
                                            Origin = Anchor.TopLeft,
                                            Anchor = Anchor.TopLeft,
                                            Height = 35,
                                            Width  = 380,
                                            Margin = new MarginPadding {
                                                Bottom = 20
                                            },
                                        },
                                        new Container
                                        {
                                            Origin           = Anchor.TopLeft,
                                            Anchor           = Anchor.TopLeft,
                                            RelativeSizeAxes = Axes.X,
                                            AutoSizeAxes     = Axes.Y,
                                            Child            = registerButton = new GamesToGoButton
                                            {
                                                Origin = Anchor.BottomCentre,
                                                Anchor = Anchor.BottomCentre,
                                                Text   = @"Registrarse",
                                                Width  = 100,
                                                Height = 35,
                                                Action = registerUser,
                                            },
                                        },
                                    },
                                },
                            },
                        },
                    },
                },
            };

            registerButton.Enabled.Value = false;

            passwordBox.Current.BindValueChanged(checkUserPass);
            usernameBox.Current.BindValueChanged(checkUserPass);
            confirmPasswordBox.Current.BindValueChanged(checkUserPass);
            emailBox.Current.BindValueChanged(checkUserPass);
        }
Example #3
0
        private void load()
        {
            RelativeSizeAxes = Axes.Both;
            Children         = new Drawable[]
            {
                shadowBox = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = Colour4.Black,
                    Alpha            = 0,
                },
                content = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        new GridContainer
                        {
                            RelativeSizeAxes = Axes.Both,
                            RowDimensions    = new[]
                            {
                                new Dimension(GridSizeMode.Relative, .2f),
                                new Dimension(GridSizeMode.Relative, .5f),
                                new Dimension()
                            },
                            ColumnDimensions = new[]
                            {
                                new Dimension()
                            },
                            Content = new[]
                            {
                                new Drawable[]
                                {
                                    new Container
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Padding          = new MarginPadding(10),
                                        Child            = new SimpleIconButton(FontAwesome.Solid.Times)
                                        {
                                            Anchor = Anchor.TopRight,
                                            Origin = Anchor.TopRight,
                                            Action = Hide,
                                        },
                                    },
                                },
                                new Drawable[]
                                {
                                    new Container
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Children         = new Drawable[]
                                        {
                                            new FillFlowContainer
                                            {
                                                RelativeSizeAxes = Axes.Both,
                                                Direction        = FillDirection.Vertical,
                                                Padding          = new MarginPadding(30),
                                                Children         = new Drawable[]
                                                {
                                                    new FillFlowContainer
                                                    {
                                                        RelativeSizeAxes = Axes.X,
                                                        AutoSizeAxes     = Axes.Y,
                                                        Direction        = FillDirection.Vertical,
                                                        Children         = new Drawable[]
                                                        {
                                                            new SpriteText
                                                            {
                                                                Origin = Anchor.TopLeft,
                                                                Anchor = Anchor.TopLeft,
                                                                Text   = @"Usuario:",
                                                                Font   = new FontUsage(size: 60)
                                                            },
                                                            usernameBox = new BasicTextBox
                                                            {
                                                                Origin           = Anchor.TopLeft,
                                                                Anchor           = Anchor.TopLeft,
                                                                Height           = 150,
                                                                RelativeSizeAxes = Axes.X,
                                                            },
                                                        }
                                                    },
                                                    new FillFlowContainer
                                                    {
                                                        RelativeSizeAxes = Axes.X,
                                                        AutoSizeAxes     = Axes.Y,
                                                        Direction        = FillDirection.Vertical,
                                                        Children         = new Drawable[]
                                                        {
                                                            new SpriteText
                                                            {
                                                                Origin = Anchor.TopLeft,
                                                                Anchor = Anchor.TopLeft,
                                                                Text   = @"Contraseña:",
                                                                Font   = new FontUsage(size: 60),
                                                            },
                                                            passwordBox = new BasicPasswordTextBox
                                                            {
                                                                Origin           = Anchor.TopLeft,
                                                                Anchor           = Anchor.TopLeft,
                                                                Height           = 150,
                                                                RelativeSizeAxes = Axes.X,
                                                            },
                                                        },
                                                    },
                                                },
                                            },
                                        },
                                    },
                                },
                                new Drawable[]
                                {
                                    new Container
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Padding          = new MarginPadding(30),
                                        Child            = login = new GamesToGoButton
                                        {
                                            Anchor           = Anchor.TopCentre,
                                            Origin           = Anchor.TopCentre,
                                            Height           = 225,
                                            RelativeSizeAxes = Axes.X,
                                            Text             = @"Iniciar Sesión",
                                            Action           = () => api.Login(usernameBox.Text, passwordBox.Text),
                                        },
                                    },
                                },
                            },
                        },
                    },
                },
            };
            login.SpriteText.Font = new FontUsage(size: 60);
            login.Enabled.Value   = false;

            passwordBox.Current.BindValueChanged(checkUserPass);
            usernameBox.Current.BindValueChanged(checkUserPass);

            localUser.BindTo(api.LocalUser);
            localUser.BindValueChanged(_ =>
            {
                usernameBox.Text = "";
                passwordBox.Text = "";
                Hide();
                nextScreenAction?.Invoke();
            });
            api.Login(@"daro31", @"1234");
        }
Example #4
0
 private void load()
 {
     RelativeSizeAxes = Axes.Both;
     Children         = new Drawable[]
     {
         shadowBox = new Box
         {
             RelativeSizeAxes = Axes.Both,
             Colour           = Colour4.Black,
             Alpha            = 0,
         },
         content = new Container
         {
             RelativeSizeAxes = Axes.Both,
             Children         = new Drawable[]
             {
                 new GridContainer
                 {
                     RelativeSizeAxes = Axes.Both,
                     RowDimensions    = new[]
                     {
                         new Dimension(GridSizeMode.Relative, .1f),
                         new Dimension(GridSizeMode.Relative, .6f),
                         new Dimension()
                     },
                     ColumnDimensions = new[]
                     {
                         new Dimension()
                     },
                     Content = new[]
                     {
                         new Drawable[]
                         {
                             new Container
                             {
                                 RelativeSizeAxes = Axes.Both,
                                 Padding          = new MarginPadding(10),
                                 Child            = new SimpleIconButton(FontAwesome.Solid.Times)
                                 {
                                     Anchor = Anchor.TopRight,
                                     Origin = Anchor.TopRight,
                                     Action = Hide,
                                 },
                             },
                         },
                         new Drawable[]
                         {
                             new Container
                             {
                                 Depth            = 0,
                                 RelativeSizeAxes = Axes.Both,
                                 Children         = new Drawable[]
                                 {
                                     new FillFlowContainer
                                     {
                                         RelativeSizeAxes = Axes.Both,
                                         Direction        = FillDirection.Vertical,
                                         Padding          = new MarginPadding(30),
                                         Children         = new Drawable[]
                                         {
                                             new Container
                                             {
                                                 Anchor           = Anchor.TopLeft,
                                                 Origin           = Anchor.TopLeft,
                                                 RelativeSizeAxes = Axes.X,
                                                 Height           = 200,
                                                 Child            = searchTextBox = new BasicTextBox
                                                 {
                                                     Anchor           = Anchor.Centre,
                                                     Origin           = Anchor.Centre,
                                                     RelativeSizeAxes = Axes.X,
                                                     Width            = .9f,
                                                     Height           = 150,
                                                 }
                                             },
                                             new Container
                                             {
                                                 Anchor           = Anchor.TopLeft,
                                                 Origin           = Anchor.TopLeft,
                                                 RelativeSizeAxes = Axes.X,
                                                 Height           = 150,
                                                 Child            = new Container
                                                 {
                                                     Anchor           = Anchor.Centre,
                                                     Origin           = Anchor.Centre,
                                                     RelativeSizeAxes = Axes.Both,
                                                     Width            = .9f,
                                                     Child            = tagsContainer = new TagSelectionContainer(100)
                                                     {
                                                         RelativeSizeAxes = Axes.X,
                                                         Height           = 100
                                                     }
                                                 }
                                             }
                                         },
                                     },
                                 },
                             },
                         },
                         new Drawable[]
                         {
                             new Container
                             {
                                 Depth            = 1,
                                 RelativeSizeAxes = Axes.Both,
                                 Padding          = new MarginPadding(30),
                                 Child            = search = new GamesToGoButton
                                 {
                                     Anchor           = Anchor.TopCentre,
                                     Origin           = Anchor.TopCentre,
                                     Height           = 225,
                                     RelativeSizeAxes = Axes.X,
                                     Text             = @"Buscar",
                                     Action           = () => searchRequest()
                                 },
                             },
                         },
                     },
                 },
             },
         },
     };
     tagsContainer.Current.BindValueChanged(v => enableButton());
     searchTextBox.Current.BindValueChanged(t => enableButton());
     search.SpriteText.Font = new FontUsage(size: 60);
     search.Enabled.Value   = false;
 }
Example #5
0
 private void load(TextureStore textures)
 {
     RelativeSizeAxes = Axes.Both;
     InternalChildren = new Drawable[]
     {
         new Box
         {
             RelativeSizeAxes = Axes.Both,
             Colour           = new Colour4(106, 100, 104, 255)
         },
         new GridContainer
         {
             RelativeSizeAxes = Axes.Both,
             RowDimensions    = new[]
             {
                 new Dimension(GridSizeMode.Relative, .1f),
                 new Dimension(),
             },
             ColumnDimensions = new[]
             {
                 new Dimension(),
             },
             Content = new[]
             {
                 new Drawable[]
                 {
                     new Container
                     {
                         RelativeSizeAxes = Axes.Both,
                         Children         = new Drawable[]
                         {
                             new Box
                             {
                                 RelativeSizeAxes = Axes.Both,
                                 Colour           = new Colour4(60, 60, 60, 255)
                             },
                             new Container
                             {
                                 Anchor           = Anchor.TopRight,
                                 Origin           = Anchor.TopRight,
                                 RelativeSizeAxes = Axes.Both,
                                 Width            = .2f,
                                 Child            = new SimpleIconButton(FontAwesome.Solid.Home)
                                 {
                                     Anchor = Anchor.Centre,
                                     Origin = Anchor.Centre,
                                     Action = this.Exit,
                                 }
                             },
                         }
                     }
                 },
                 new Drawable[]
                 {
                     new Container
                     {
                         RelativeSizeAxes = Axes.Both,
                         Child            = new BasicScrollContainer
                         {
                             RelativeSizeAxes = Axes.Both,
                             ClampExtension   = 30,
                             Child            = new FillFlowContainer
                             {
                                 AutoSizeAxes     = Axes.Y,
                                 RelativeSizeAxes = Axes.X,
                                 Direction        = FillDirection.Vertical,
                                 Children         = new Drawable[]
                                 {
                                     new Container
                                     {
                                         RelativeSizeAxes = Axes.X,
                                         Height           = 400,
                                         Children         = new Drawable[]
                                         {
                                             new Box
                                             {
                                                 RelativeSizeAxes = Axes.Both,
                                                 Colour           = Colour4.Red
                                             },
                                             new GamePreviewContainer(onlineGame)
                                             {
                                                 GameNameSize = 90,
                                                 MadeBySize   = 60,
                                             }
                                         }
                                     },
                                     new Container
                                     {
                                         RelativeSizeAxes = Axes.X,
                                         AutoSizeAxes     = Axes.Y,
                                         Child            = new FillFlowContainer
                                         {
                                             RelativeSizeAxes = Axes.X,
                                             AutoSizeAxes     = Axes.Y,
                                             Direction        = FillDirection.Vertical,
                                             Children         = new Drawable[]
                                             {
                                                 new SpriteText
                                                 {
                                                     Text = @"Descripción:",
                                                     Font = new FontUsage(size: 70)
                                                 },
                                                 new TextFlowContainer((e) => e.Font = new FontUsage(size: 70))
                                                 {
                                                     RelativeSizeAxes = Axes.X,
                                                     Height           = 300,
                                                     Text             = onlineGame.Description,
                                                 },
                                             },
                                         },
                                     },
                                     new SpriteText
                                     {
                                         Text = "Salas:",
                                         Font = new FontUsage(size: 80)
                                     },
                                     new Container
                                     {
                                         RelativeSizeAxes = Axes.X,
                                         AutoSizeAxes     = Axes.Y,
                                         Padding          = new MarginPadding(80),
                                         Children         = new Drawable[]
                                         {
                                             new Container
                                             {
                                                 RelativeSizeAxes = Axes.Both,
                                                 Padding          = new MarginPadding(.9f),
                                                 Children         = new Drawable[]
                                                 {
                                                     new Box
                                                     {
                                                         RelativeSizeAxes = Axes.Both,
                                                         Colour           = Colour4.LightGray
                                                     },
                                                     errorText = new TextFlowContainer((e) => { e.Font = new FontUsage(size: 80); e.Colour = Colour4.Black; })
                                                     {
                                                         RelativeSizeAxes = Axes.X,
                                                         Height           = 1000,
                                                     },
                                                 },
                                             },
                                             new BasicScrollContainer
                                             {
                                                 RelativeSizeAxes = Axes.X,
                                                 Height           = 1000,
                                                 ClampExtension   = 30,
                                                 Masking          = true,
                                                 BorderColour     = Colour4.Black,
                                                 BorderThickness  = 3.5f,
                                                 Child            = gameRooms = new FillFlowContainer
                                                 {
                                                     RelativeSizeAxes = Axes.X,
                                                     AutoSizeAxes     = Axes.Y,
                                                     Direction        = FillDirection.Vertical
                                                 },
                                             },
                                         },
                                     },
                                     new Container
                                     {
                                         RelativeSizeAxes = Axes.X,
                                         Height           = 200,
                                         Child            = reportButton = new GamesToGoButton
                                         {
                                             Anchor           = Anchor.Centre,
                                             Origin           = Anchor.Centre,
                                             RelativeSizeAxes = Axes.X,
                                             Height           = 150,
                                             Width            = .85f,
                                             Text             = @"Reportar",
                                             Action           = () => reportOverlay.Show()
                                         },
                                     },
                                 },
                             },
                         },
                     },
                 },
             },
         },
         new Container
         {
             Anchor  = Anchor.BottomRight,
             Origin  = Anchor.BottomRight,
             Size    = new Vector2(300),
             Padding = new MarginPadding(50),
             Child   = new CircularContainer
             {
                 RelativeSizeAxes = Axes.Both,
                 Masking          = true,
                 Child            = new SurfaceButton
                 {
                     Action           = createRoom,
                     BackgroundColour = Colour4.Pink,
                     Children         = new Drawable[]
                     {
                         new SpriteIcon
                         {
                             Anchor           = Anchor.Centre,
                             Origin           = Anchor.Centre,
                             RelativeSizeAxes = Axes.Both,
                             Height           = .4f,
                             Width            = .4f,
                             Icon             = FontAwesome.Solid.Plus,
                         },
                     },
                 },
             },
         },
         reportOverlay = new ReportOverlay()
         {
             Game = onlineGame
         }
     };
     reportButton.SpriteText.Font = new FontUsage(size: 80);
     populateRooms();
 }
Example #6
0
        private void load()
        {
            RelativeSizeAxes = Axes.Both;
            Children         = new Drawable[]
            {
                shadowBox = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = Colour4.Black,
                    Alpha            = 0,
                },
                content = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        new GridContainer
                        {
                            RelativeSizeAxes = Axes.Both,
                            RowDimensions    = new[]
                            {
                                new Dimension(GridSizeMode.Relative, .2f),
                                new Dimension(GridSizeMode.Relative, .5f),
                                new Dimension()
                            },
                            ColumnDimensions = new[]
                            {
                                new Dimension()
                            },
                            Content = new[]
                            {
                                new Drawable[]
                                {
                                    new Container
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Padding          = new MarginPadding(10),
                                        Child            = new SimpleIconButton(FontAwesome.Solid.Times)
                                        {
                                            Anchor = Anchor.TopRight,
                                            Origin = Anchor.TopRight,
                                            Action = Hide,
                                        },
                                    },
                                },
                                new Drawable[]
                                {
                                    new Container
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Children         = new Drawable[]
                                        {
                                            new FillFlowContainer
                                            {
                                                RelativeSizeAxes = Axes.Both,
                                                Direction        = FillDirection.Vertical,
                                                Padding          = new MarginPadding(30),
                                                Children         = new Drawable[]
                                                {
                                                    new FillFlowContainer
                                                    {
                                                        RelativeSizeAxes = Axes.X,
                                                        AutoSizeAxes     = Axes.Y,
                                                        Direction        = FillDirection.Vertical,
                                                        Children         = new Drawable[]
                                                        {
                                                            new SpriteText
                                                            {
                                                                Origin = Anchor.TopLeft,
                                                                Anchor = Anchor.TopLeft,
                                                                Text   = @"Email:",
                                                                Font   = new FontUsage(size: 60)
                                                            },
                                                            emailBox = new BasicTextBox
                                                            {
                                                                Origin           = Anchor.TopLeft,
                                                                Anchor           = Anchor.TopLeft,
                                                                Height           = 150,
                                                                RelativeSizeAxes = Axes.X,
                                                            },
                                                        }
                                                    },
                                                    new FillFlowContainer
                                                    {
                                                        RelativeSizeAxes = Axes.X,
                                                        AutoSizeAxes     = Axes.Y,
                                                        Direction        = FillDirection.Vertical,
                                                        Children         = new Drawable[]
                                                        {
                                                            new SpriteText
                                                            {
                                                                Origin = Anchor.TopLeft,
                                                                Anchor = Anchor.TopLeft,
                                                                Text   = @"Nombre de Usuario:",
                                                                Font   = new FontUsage(size: 60)
                                                            },
                                                            usernameBox = new BasicTextBox
                                                            {
                                                                Origin           = Anchor.TopLeft,
                                                                Anchor           = Anchor.TopLeft,
                                                                Height           = 150,
                                                                RelativeSizeAxes = Axes.X,
                                                            },
                                                        }
                                                    },
                                                    new FillFlowContainer
                                                    {
                                                        RelativeSizeAxes = Axes.X,
                                                        AutoSizeAxes     = Axes.Y,
                                                        Direction        = FillDirection.Vertical,
                                                        Children         = new Drawable[]
                                                        {
                                                            new SpriteText
                                                            {
                                                                Origin = Anchor.TopLeft,
                                                                Anchor = Anchor.TopLeft,
                                                                Text   = @"Contraseña:",
                                                                Font   = new FontUsage(size: 60),
                                                            },
                                                            passwordBox = new BasicPasswordTextBox
                                                            {
                                                                Origin           = Anchor.TopLeft,
                                                                Anchor           = Anchor.TopLeft,
                                                                Height           = 150,
                                                                RelativeSizeAxes = Axes.X,
                                                            },
                                                        },
                                                    },
                                                    new FillFlowContainer
                                                    {
                                                        RelativeSizeAxes = Axes.X,
                                                        AutoSizeAxes     = Axes.Y,
                                                        Direction        = FillDirection.Vertical,
                                                        Children         = new Drawable[]
                                                        {
                                                            new SpriteText
                                                            {
                                                                Origin = Anchor.TopLeft,
                                                                Anchor = Anchor.TopLeft,
                                                                Text   = @"Confirmar Contraseña:",
                                                                Font   = new FontUsage(size: 60),
                                                            },
                                                            confirmPasswordBox = new BasicPasswordTextBox
                                                            {
                                                                Origin           = Anchor.TopLeft,
                                                                Anchor           = Anchor.TopLeft,
                                                                Height           = 150,
                                                                RelativeSizeAxes = Axes.X,
                                                            },
                                                        },
                                                    },
                                                },
                                            },
                                        },
                                    },
                                },
                                new Drawable[]
                                {
                                    new Container
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Padding          = new MarginPadding(30),
                                        Child            = register = new GamesToGoButton
                                        {
                                            Anchor           = Anchor.TopCentre,
                                            Origin           = Anchor.TopCentre,
                                            Height           = 225,
                                            RelativeSizeAxes = Axes.X,
                                            Text             = @"Registrarse",
                                            Action           = registerUser,
                                        },
                                    },
                                },
                            },
                        },
                    },
                },
            };
            register.SpriteText.Font = new FontUsage(size: 60);
            register.Enabled.Value   = false;

            passwordBox.Current.BindValueChanged(checkUserPass);
            confirmPasswordBox.Current.BindValueChanged(checkUserPass);
            emailBox.Current.BindValueChanged(checkUserPass);
            usernameBox.Current.BindValueChanged(checkUserPass);
        }
Example #7
0
        private void load(TextureStore textures)
        {
            RelativeSizeAxes = Axes.Both;

            InternalChildren = new Drawable[]
            {
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = new Colour4(106, 100, 104, 255)
                },
                new GridContainer
                {
                    RelativeSizeAxes = Axes.Both,
                    RowDimensions    = new []
                    {
                        new Dimension(GridSizeMode.Relative, .5f),
                        new Dimension(GridSizeMode.Relative, .25f),
                        new Dimension()
                    },
                    ColumnDimensions = new[]
                    {
                        new Dimension()
                    },
                    Content = new []
                    {
                        new Drawable[]
                        {
                            new CircularContainer
                            {
                                Anchor          = Anchor.Centre,
                                Origin          = Anchor.Centre,
                                BorderColour    = Colour4.Black,
                                BorderThickness = 3.5f,
                                Masking         = true,
                                Size            = new Vector2(600, 600),
                                Child           = new Sprite
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Texture          = textures.Get("Images/gtg")
                                }
                            }
                        },
                        new Drawable[]
                        {
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Child            = loginButton = new GamesToGoButton
                                {
                                    Anchor = Anchor.BottomCentre,
                                    Origin = Anchor.BottomCentre,
                                    Height = 150,
                                    Width  = 800,
                                    Text   = "Iniciar Sesión",
                                    Action = () => loginOverlay.Show()
                                }
                            }
                        },
                        new Drawable[]
                        {
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Child            = registerButton = new GamesToGoButton
                                {
                                    Anchor = Anchor.Centre,
                                    Origin = Anchor.Centre,
                                    Height = 150,
                                    Width  = 800,
                                    Text   = "Registrarse",
                                    Action = () => registerOverlay.Show()
                                },
                            },
                        },
                    },
                },
                loginOverlay    = new LoginOverlay(loginIntoServer),
                registerOverlay = new RegisterOverlay(),
            };
            loginButton.SpriteText.Font    = new FontUsage(size: 60);
            registerButton.SpriteText.Font = new FontUsage(size: 60);
        }