Beispiel #1
0
        private void load()
        {
            Action += () => gameScreen.SelectPlayer(Model);
            Enabled.BindTo(gameScreen.EnablePlayerSelection);
            Enabled.Value = false;



            currentSelected.BindTo(gameScreen.CurrentSelectedPlayer);
            RelativeSizeAxes = Axes.Y;
            Width            = 180;

            Child = new FillFlowContainer
            {
                RelativeSizeAxes = Axes.Both,
                Direction        = FillDirection.Vertical,
                Children         = new Drawable[]
                {
                    borderContainer = new CircularContainer
                    {
                        Anchor          = Anchor.Centre,
                        Origin          = Anchor.Centre,
                        BorderColour    = Colour4.White,
                        BorderThickness = 3.5f,
                        Masking         = true,
                        Size            = new Vector2(100),
                        Child           = new Sprite
                        {
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre,
                            RelativeSizeAxes = Axes.Both,
                            Texture          = textures.Get($"https://gamestogo.company/api/Users/DownloadImage/{Model.BackingUser.ID}"),
                        },
                    },
                    new SpriteText
                    {
                        Anchor = Anchor.Centre,
                        Origin = Anchor.Centre,
                        Text   = Model.BackingUser.Username,
                        Font   = new FontUsage(size: 40),
                    },
                },
            };
        }