示例#1
0
        private void load(AudioManager audio)
        {
            InternalChild = clickableContent = new OsuClickableContainer
            {
                Width            = 15,
                Alpha            = 0,
                Scale            = new Vector2(0, 1),
                RelativeSizeAxes = Axes.Y,
                Action           = changeTeam,
                Child            = box = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    CornerRadius     = 5,
                    Masking          = true,
                    Scale            = new Vector2(0, 1),
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Child            = new Box
                    {
                        Colour           = Color4.White,
                        RelativeSizeAxes = Axes.Both,
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                    }
                }
            };

            if (Client.LocalUser?.Equals(user) == true)
            {
                clickableContent.Action      = changeTeam;
                clickableContent.TooltipText = "Change team";
            }

            sampleTeamSwap = audio.Samples.Get(@"Multiplayer/team-swap");
        }
示例#2
0
        private void load()
        {
            box = new Container
            {
                RelativeSizeAxes = Axes.Both,
                CornerRadius     = 5,
                Masking          = true,
                Scale            = new Vector2(0, 1),
                Anchor           = Anchor.Centre,
                Origin           = Anchor.Centre,
                Child            = new Box
                {
                    Colour           = Color4.White,
                    RelativeSizeAxes = Axes.Both,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                }
            };

            if (Client.LocalUser?.Equals(user) == true)
            {
                InternalChild = new OsuClickableContainer
                {
                    RelativeSizeAxes = Axes.Both,
                    TooltipText      = "Change team",
                    Action           = changeTeam,
                    Child            = box
                };
            }
            else
            {
                InternalChild = box;
            }
        }
示例#3
0
            public RetryButton()
            {
                AutoSizeAxes = Axes.Both;

                Child = new OsuClickableContainer
                {
                    AutoSizeAxes = Axes.Both,
                    Action       = () => Action?.Invoke(),
                    Child        = icon = new SpriteIcon
                    {
                        Icon   = FontAwesome.fa_refresh,
                        Size   = new Vector2(TEXT_SIZE),
                        Shadow = true,
                    },
                };
            }
示例#4
0
 public RetryButton()
 {
     Height = 26;
     Width  = 26;
     Child  = new OsuClickableContainer
     {
         AutoSizeAxes = Axes.Both,
         Anchor       = Anchor.Centre,
         Origin       = Anchor.Centre,
         Action       = () => Action?.Invoke(),
         Child        = icon = new SpriteIcon
         {
             Icon   = FontAwesome.fa_refresh,
             Size   = new Vector2(26),
             Shadow = true,
         },
     };
 }