コード例 #1
0
        public MultiplayerGameHeader()
            : base(new ScalableVector2(650, 36), new ScalableVector2(650, 36))
        {
            Alpha = 0;

            PausePlayButton = new PausePlayButton
            {
                Parent    = this,
                Alignment = Alignment.TopRight,
                Size      = new ScalableVector2(20, 20)
            };

            RoomName = new SpriteTextBitmap(FontsBitmap.GothamRegular, OnlineManager.CurrentGame.Name)
            {
                Parent    = this,
                Alignment = Alignment.TopLeft,
                FontSize  = 16,
                Tint      = Colors.SecondaryAccent
            };

            AddContainedDrawable(RoomName);

            // ReSharper disable once ObjectCreationAsStatement
            new Sprite
            {
                Parent    = this,
                Alignment = Alignment.BotLeft,
                Size      = new ScalableVector2(Width, 2),
                Y         = -6,
                Alpha     = 0.85f
            };

            OnlineManager.Client.OnGameNameChanged += OnGameNameChanged;
        }
コード例 #2
0
 private void SkipToSong(QueuedSong queuedSong)
 {
     while (mainPlaylist.First() != queuedSong)
     {
         MainPlayerSkip(false);
     }
     queuedSong.SetPlaying(true);
     PlayOnMainPlayer(queuedSong.fileInfo);
     PausePlayButton.Focus();
 }
コード例 #3
0
        void ReleaseDesignerOutlets()
        {
            if (ColorIndicator != null)
            {
                ColorIndicator.Dispose();
                ColorIndicator = null;
            }

            if (ErrorLabel != null)
            {
                ErrorLabel.Dispose();
                ErrorLabel = null;
            }

            if (ImageCell != null)
            {
                ImageCell.Dispose();
                ImageCell = null;
            }

            if (NodeEditorButton != null)
            {
                NodeEditorButton.Dispose();
                NodeEditorButton = null;
            }

            if (PausePlayButton != null)
            {
                PausePlayButton.Dispose();
                PausePlayButton = null;
            }

            if (ProgressIndicator != null)
            {
                ProgressIndicator.Dispose();
                ProgressIndicator = null;
            }

            if (RandomImageButton != null)
            {
                RandomImageButton.Dispose();
                RandomImageButton = null;
            }

            if (RandomImageSpinner != null)
            {
                RandomImageSpinner.Dispose();
                RandomImageSpinner = null;
            }

            if (ScaleChooser != null)
            {
                ScaleChooser.Dispose();
                ScaleChooser = null;
            }

            if (StopButton != null)
            {
                StopButton.Dispose();
                StopButton = null;
            }
        }