Exemplo n.º 1
0
        public override void Draw()
        {
            var myPosition = this.Position.Clone();

            DrawEnteredTextBar(myPosition.Clone());
            myPosition.X += (this.Width / 2.0f);

            FontManager.DrawString(_result.ToString(), "LargeFont", myPosition,
                                   TextColour, FontAlign.Center);
            myPosition.Y += 40;
            foreach (string line in DescriptionText.Split('\n'))
            {
                FontManager.DrawString(line, "DefaultFont", myPosition,
                                       TextColour, FontAlign.Center);
                myPosition.Y += 25;
            }

            FontManager.DrawString("Press enter when done, or escape to cancel.", "DefaultFont", myPosition,
                                   TextColour, FontAlign.Center);
            myPosition.Y += 25;

            if (Shift)
            {
                _shiftSprite.Y = (int)myPosition.Y;
                _shiftSprite.X = (int)myPosition.X - 50;
                _shiftSprite.Draw();
            }
            if (CapsLock)
            {
                _capsLockSprite.Y = (int)myPosition.Y;
                _capsLockSprite.X = (int)myPosition.X + 50;
                _capsLockSprite.Draw();
            }
        }
Exemplo n.º 2
0
        private void DrawText()
        {
            CalculateTextPositions();
            var timeDiff = TextureManager.LastGameTime.ElapsedRealTime.TotalSeconds;

            if (OptionChangeActive)
            {
                _optionControlOpacity = Math.Min(255, _optionControlOpacity + (FADEIN_SPEED * timeDiff));
            }
            else
            {
                _optionControlOpacity = Math.Max(0, _optionControlOpacity - (FADEOUT_SPEED * timeDiff));
            }


            var playerName = (Player.Profile == null) ? "Guest" : this.Player.Profile.Name;

            if (Player.CPU)
            {
                playerName = "CPU";
            }

            DrawChangeControls();
            _textColor.A = (byte)(255 - _optionControlOpacity);
            var scale = FontManager.ScaleTextToFit(playerName, "TwoTech36", this.Width - 170, 50);

            FontManager.DrawString(playerName, "TwoTech36", _nameTextPosition, scale, _textColor,
                                   FontAlign.Center);
        }
Exemplo n.º 3
0
        public override void Draw()
        {
            if (Player.Profile == null)
            {
                return;
            }
            _drawColor.A = Opacity;
            _levelBaseSprite.Position        = new Vector2(this.X, this.Y);
            _levelFrontSprite.Position       = new Vector2(this.X, this.Y + 12);
            _levelBaseSprite.ColorShading.A  = this.Opacity;
            _levelFrontSprite.ColorShading.A = this.Opacity;
            _levelTextPosition = new Vector2(this.X + this.Width - 3, this.Y - 15);

            var progress = Player.GetLevelProgressSafe();

            progress = Math.Min(1, progress);

            _levelFrontSprite.Width = (int)(this.Width * progress);
            _levelFrontSprite.Draw();
            _levelBaseSprite.Width = this.Width;
            _levelBaseSprite.Draw();


            //Draw level text.
            var playerlevel = String.Format("{0:00}", Player.GetLevel());
            var scale       = FontManager.ScaleTextToFit(playerlevel, "TwoTech36", 32, 38);

            FontManager.DrawString(playerlevel, "TwoTech36", _levelTextPosition, scale, _drawColor,
                                   FontAlign.Right);
        }
Exemplo n.º 4
0
        private void DrawBPMText()
        {
            var bpmLabelText = _bpmTextPosition.Clone();

            bpmLabelText.X -= 120;
            bpmLabelText.Y += 4;
            if (_actualMinBpm == _actualMaxBpm)
            {
                FontManager.DrawString(String.Format("{0:000.0}", Math.Min(999.9, _displayedMinBpm)),
                                       "TwoTechLarge",
                                       _bpmTextPosition, Color.Black, FontAlign.Right);
            }
            else
            {
                _bpmTextPosition.Y += 2;
                FontManager.DrawString(String.Format("{0:000.0}", Math.Min(999.9, _displayedMinBpm)),
                                       "TwoTech24",
                                       _bpmTextPosition, Color.Black, FontAlign.Right);
                _bpmTextPosition.Y += 19;
                FontManager.DrawString(String.Format("{0:000.0}", Math.Min(999.9, _displayedMaxBpm)),
                                       "TwoTech24",
                                       _bpmTextPosition, Color.Black, FontAlign.Right);
                _bpmTextPosition.Y -= 21;

                FontManager.DrawString("Min:",
                                       "DefaultFont",
                                       bpmLabelText, Color.Black, FontAlign.Left);
                bpmLabelText.Y += 20;
                FontManager.DrawString("Max:",
                                       "DefaultFont",
                                       bpmLabelText, Color.Black, FontAlign.Left);
            }
        }
Exemplo n.º 5
0
        private void DrawLabels()
        {
            if (!ShowLabels)
            {
                return;
            }
            var position = new Vector2(_labelPositions[0] + this.X + 10, this.Y);

            if (_labelPositions[0] != 0.0)
            {
                if (position.X < 50)
                {
                    position.X = 50;
                }
                FontManager.DrawString("AudioStart", "DefaultFont", position, Color.Black, FontAlign.Center);
            }
            position.X = (_labelPositions[1] + this.X + 10);
            position.Y = this.Y + this.Height - 20;

            if (position.X < 35)
            {
                position.X = 35;
            }
            FontManager.DrawString("Offset", "DefaultFont", position, Color.Black, FontAlign.Center);

            position.X = (_labelPositions[2] + this.X + 10);
            position.Y = this.Y;
            FontManager.DrawString("Length", "DefaultFont", position, Color.Black, FontAlign.Right);
        }
Exemplo n.º 6
0
        private void DrawKeyboard()
        {
            var initialPosition = this.Position.Clone();
            var drawPosition    = this.Position.Clone();

            initialPosition.Y += 35;
            int counter = 0;

            foreach (char c in _chars)
            {
                drawPosition.X = (initialPosition.X) + (SpacingX * (counter % Columns));
                drawPosition.Y = (initialPosition.Y) + (SpacingY * (counter / Columns));
                if (counter == _selectedIndex)
                {
                    FontManager.DrawString("" + c, "TwoTech24", drawPosition, HighlightColor, FontAlign.Left);
                }
                else
                {
                    FontManager.DrawString("" + c, "TwoTech24", drawPosition, BaseColor, FontAlign.Left);
                }
                counter++;
            }

            for (int x = 0; x < 3; x++)
            {
                drawPosition.X             = (initialPosition.X) + (SpacingX * (counter % Columns));
                drawPosition.Y             = (initialPosition.Y) + (SpacingY * (counter / Columns));
                _specialChars.ColorShading = (_selectedIndex == _chars.Count() + x) ? HighlightColor : BaseColor;
                _specialChars.Draw(x, 25, 25, (int)drawPosition.X, (int)drawPosition.Y);
                counter++;
            }
        }
Exemplo n.º 7
0
        private void DrawTitleDisplay()
        {
            _songTitleBase.Draw();

            var     textPosition = _songTitleBase.Position.Clone();
            Vector2 scale;

            textPosition.X += 185;
            if (!String.IsNullOrEmpty(DisplayedSong.Title))
            {
                scale = FontManager.ScaleTextToFit(DisplayedSong.Title, "LargeFont", 350, 100);
                FontManager.DrawString(DisplayedSong.Title, "LargeFont",
                                       textPosition, scale, Color.Black, FontAlign.Center);
            }
            textPosition.X += 5;
            textPosition.Y += 25;
            if (!String.IsNullOrEmpty(DisplayedSong.Subtitle))
            {
                scale = FontManager.ScaleTextToFit(DisplayedSong.Subtitle, "DefaultFont", 360, 100);
                FontManager.DrawString(DisplayedSong.Subtitle, "DefaultFont",
                                       textPosition, scale, Color.Black, FontAlign.Center);
            }
            textPosition.Y += 30;
            if (!String.IsNullOrEmpty(DisplayedSong.Artist))
            {
                scale = FontManager.ScaleTextToFit(DisplayedSong.Artist, "DefaultFont", 360, 100);
                FontManager.DrawString(DisplayedSong.Artist, "DefaultFont",
                                       textPosition, scale, Color.Black, FontAlign.Center);
            }
        }
Exemplo n.º 8
0
        public void Draw(double phraseNumber)
        {
            if (!_spritesInit)
            {
                InitSprites();
            }

            _baseSprite.Size = this.Size;
            _baseSprite.Draw();
            _maxBaseSprite.ColorShading   = Parent.MaxHighlightColors[PlayerID];
            _maxBaseSprite.ColorShading.A = Convert.ToByte(_lastLevelOpacity);

            var maxFrontBeatFraction = (phraseNumber / 4) - Math.Floor(phraseNumber / 4);
            var beatFraction         = (phraseNumber * 4) - Math.Floor(phraseNumber * 4);

            if (LevelBarFull)
            {
                _maxBaseSprite.ColorShading.A = (byte)((1 - beatFraction) * 255);
                _maxFrontOpacity = Math.Min(255, _maxFrontOpacity + (TextureManager.LastDrawnPhraseDiff * MAX_FRONT_SHOW_SPEED));
            }
            else
            {
                _maxFrontOpacity = Math.Max(0, _maxFrontOpacity - (TextureManager.LastDrawnPhraseDiff * MAX_FRONT_HIDE_SPEED));
            }

            _maxFrontSprite.ColorShading.A = (byte)((_maxFrontOpacity));


            _maxBaseSprite.Draw();
            FontManager.DrawString("" + (int)(Parent.Players[PlayerID].Level * Multiplier), "DefaultFont",
                                   _textPosition, Color.Black, FontAlign.Center);

            DrawBars();
            _maxFrontSprite.DrawTiled((int)(maxFrontBeatFraction * _maxFrontSprite.Texture.Width), 0, _maxFrontSprite.Texture.Width, _maxFrontSprite.Texture.Height);
        }
Exemplo n.º 9
0
        private void DrawSingleBar(Vector2 position, int player, bool allPlayers)
        {
            _rightSprite.ColorShading.A          =
                _leftSpriteMap.ColorShading.A    =
                    _middleSprite.ColorShading.A = (byte)Opacity;
            _rightSprite.Size     = new Vector2(RIGHT_SIDE_WIDTH, this.Height);
            _rightSprite.Position = position.Clone();
            _rightSprite.X       += this.Width - RIGHT_SIDE_WIDTH;
            var barWidth       = this.Width - RIGHT_SIDE_WIDTH - LEFT_SIDE_WIDTH;
            var totalBeatlines = (from e in Players[player].Judgements select e).Take(6).Sum();

            var idx = (Players[player].IsCPUPlayer) ? 4 : player;

            if (allPlayers)
            {
                idx = 5;
            }
            _leftSpriteMap.Draw(idx, LEFT_SIDE_WIDTH, this.Height, position);
            position.X            += LEFT_SIDE_WIDTH;
            _middleSprite.Width    = barWidth;
            _middleSprite.Height   = this.Height;
            _middleSprite.Position = position.Clone();

            var maxWidth       = barWidth;
            var percentageText = " -----";

            if (totalBeatlines >= 5)
            {
                _partsSpriteMap.ColorShading.A = (byte)(_barOpacity * Opacity / 255);
                for (int y = 0; y < (int)BeatlineNoteJudgement.Count; y++)
                {
                    var width = (float)Math.Ceiling((barWidth) * Players[player].Judgements[y] / totalBeatlines);
                    width     = Math.Min(width, maxWidth);
                    maxWidth -= width;
                    _partsSpriteMap.Draw(y, width, this.Height, position);
                    position.X += width;
                }
                _barOpacity    = Math.Min(255, _barOpacity + (TextureManager.LastGameTime.ElapsedRealTime.TotalSeconds * BAR_SHOW_SPEED));
                percentageText = String.Format("{0:F1}%", Players[player].CalculatePercentage());
            }
            else
            {
                _barOpacity = 0;
            }
            _middleSprite.Draw();

            _rightSprite.Draw();
            _rightSprite.X += 35;
            _rightSprite.Y += (this.Height / 2) - 10;
            var textColour = Color.Black;

            textColour.A = (byte)Opacity;
            FontManager.DrawString(percentageText, "DefaultFont", _rightSprite.Position, textColour,
                                   FontAlign.Center);

            position.X = this.Position.X;
        }
Exemplo n.º 10
0
        private void DrawScoreText()
        {
            var blueTextPosition = new Vector2(this.X + 15, this.Y + 5);
            var redTextPosition  = new Vector2(this.X + this.Width - 15, this.Y + 5);

            FontManager.DrawString("" + BlueScore, "LargeFont",
                                   blueTextPosition, Color.White, FontAlign.Left);
            FontManager.DrawString("" + RedScore, "LargeFont",
                                   redTextPosition, Color.White, FontAlign.Right);
        }
Exemplo n.º 11
0
        public override void Draw()
        {
            DrawEnteredTextBar(this.Position.Clone());
            var enteredTextPosition = this.Position.Clone();

            enteredTextPosition.X += this.Width / 2;
            FontManager.DrawString(EnteredText, "TwoTech24", enteredTextPosition, BaseColor, FontAlign.Center);

            DrawKeyboard();
        }
Exemplo n.º 12
0
        private void DrawText(int player, Vector2 position)
        {
            var textPosition = position.Clone();

            textPosition.X += 25;

            FontManager.DrawString(String.Format("{0:D3}", (int)_displayedLife[player]),
                                   "DefaultFont", textPosition, Color.Black, FontAlign.Center);

            textPosition.X += 60;
            FontManager.DrawString(String.Format("{0:P0}", _displayedLife[player] / TrueCapacity),
                                   "DefaultFont", textPosition, Color.Black, FontAlign.Center);
        }
Exemplo n.º 13
0
        private void DrawText()
        {
            var textPosition = this.Position.Clone();

            textPosition.X += 70;
            textPosition.Y += 2;

            FontManager.DrawString(string.Format("{0:0.0}x", _displayedGrooveMomentum), "LargeFont",
                                   textPosition, Color.Black, FontAlign.Right);

            textPosition.X += 84;
            FontManager.DrawString(string.Format("{0:0.0}x", Player.PeakGrooveMomentum), "DefaultFont",
                                   textPosition, Color.Black, FontAlign.Right);
        }
Exemplo n.º 14
0
        public void DrawText()
        {
//Draw Text
            var textPosition = this.Position.Clone();

            textPosition += new Vector2(45, 1);
            Vector2 scale = FontManager.ScaleTextToFit(Song.Title, "LargeFont", _textMaxWidth, (int)this.Height);

            FontManager.DrawString(Song.Title, "LargeFont", textPosition, scale, _textDrawColor, FontAlign.Left);
            textPosition.Y += 22;
            scale           = FontManager.ScaleTextToFit(Song.Artist, "DefaultFont", TextMaxWidth, (int)this.Height);
            FontManager.DrawString(Song.Artist, "DefaultFont", textPosition, scale, _textDrawColor,
                                   FontAlign.Left);
        }
Exemplo n.º 15
0
        private void DrawLengthDisplay()
        {
            _songLengthBase.Draw();
            var diff     = (DisplayedSong.Length - DisplayedSong.Offset) - _displayedLength;
            var changeMx = Math.Min(0.5, TextureManager.LastGameTime.ElapsedRealTime.TotalSeconds * BPM_LENGTH_ANIMATION_SPEED);

            _displayedLength += (diff * (changeMx));
            var textPosition = _songLengthBase.Position.Clone();

            textPosition.X += 100;
            textPosition.Y -= 0;
            var ts = TimeSpan.FromSeconds(_displayedLength);

            FontManager.DrawString(String.Format("{0}:{1:00}", ts.Minutes, ts.Seconds), "TwoTech36", textPosition, Color.Black, FontAlign.Right);
        }
Exemplo n.º 16
0
        public override void Draw()
        {
            var position = this.Position.Clone();

            _songTypeBackgroundSpriteMap.Draw(_songIndex, this.Width, this.Height, position);
            position.Y += 1;
            position.X += 5;
            _songTypeIconSpriteMap.Draw(_songIndex, this.Height - 1, this.Height - 1, position);

            position.X = this.X + this.Width - 10;
            position.Y = this.Y + 1;
            var audioExt = Path.GetExtension(Song.AudioFile).ToUpper().TrimStart('.');
            var songExt  = Path.GetExtension(Song.DefinitionFile).ToUpper().TrimStart('.');

            FontManager.DrawString(audioExt, "DefaultFont", position, Color.Black, FontAlign.Right);
            position.Y += 16;
            FontManager.DrawString(songExt, "DefaultFont", position, Color.Black, FontAlign.Right);
        }
Exemplo n.º 17
0
        private void DrawMenuItems(int startItem, int lastItem)
        {
            int xOptionOffset = CalculateXOptionOffset();
            var position      = new Vector2 {
                X = this.X + 10, Y = this.Y + 30
            };

            for (int i = startItem; i <= lastItem; i++)
            {
                MenuItem menuItem = _menuItems[i];
                Color    drawColor;

                if (IsSelected(menuItem))
                {
                    SelectedItemBackgroundColor.A = Opacity;
                    drawColor = HighlightColor;
                    _selectedItemSprite.ColorShading = SelectedItemBackgroundColor;
                    _selectedItemSprite.Position     = position.Clone();
                    _selectedItemSprite.Y           += 1;
                    _selectedItemSprite.X           -= 5;
                    _selectedItemSprite.Width        = this.Width - 10;
                    _selectedItemSprite.Height       = ItemSpacing + 3;
                    _selectedItemSprite.Draw();
                }
                else
                {
                    drawColor = TextColor;
                }

                drawColor.A = menuItem.Enabled ? Opacity : (byte)(Opacity / 2);
                FontManager.DrawString(menuItem.ItemText, FontName, position, drawColor, FontAlign.Left);
                position.X += xOptionOffset;

                var menuOptionText = menuItem.SelectedText();
                var scale          = FontManager.ScaleTextToFit(menuOptionText, FontName, (int)this.Width - 20 - xOptionOffset,
                                                                1000);

                FontManager.DrawString(menuOptionText, FontName, position, scale, drawColor, FontAlign.Left);


                position.X -= xOptionOffset;
                position.Y += ItemSpacing;
            }
        }
Exemplo n.º 18
0
        public override void Draw()
        {
            var shortPath = CurrentFolder;
            var position  = this.Position;

            position.X += 5;


            var pathWidth = FontManager.ScaleTextToFit(shortPath, "LargeFont", (int)this.Width - 10, 50);

            FontManager.DrawString(shortPath, "LargeFont", position, pathWidth, Color.Black, FontAlign.Left);

            FileList.X     = this.X;
            FileList.Y     = this.Y + 35;
            FileList.Width = this.Width;
            FileList.Draw();

            DrawControlHelp();
        }
Exemplo n.º 19
0
        private void DrawSides()
        {
            for (int x = 0; x < 4; x++)
            {
                if (!Parent.Players[x].Playing)
                {
                    continue;
                }

                _sidePart.Position = SidePositions[x];
                _sidePart.Draw();
            }
            _middlePart.Draw();


            FontManager.DrawString(String.Format("{0:D3}", (int)TotalLife()), "LargeFont",
                                   GameCore.Instance.Metrics["CoopLifeBarMiddleText", 0], Color.Black, FontAlign.Center);

            FontManager.DrawString(string.Format("{0:D3}", (int)TrueCapacity), "DefaultFont", GameCore.Instance.Metrics["CoopLifeBarMiddleText", 1], Color.Black, FontAlign.Center);
        }
Exemplo n.º 20
0
        public override void Draw()
        {
            var message = "";

            if (!Visible)
            {
                return;
            }

            switch (Status)
            {
            case UpdaterStatus.DISABLED:
                message = "Update checking is disabled. It can be enabled from the Options Menu.";
                break;

            case UpdaterStatus.CHECKING:
                message = "Checking for updates...";
                break;

            case UpdaterStatus.FAILED:
                message = "Update check failed: " + UpdateDetails;
                break;

            case UpdaterStatus.SUCCESSFUL:
                message = DetermineVersionMessage();
                break;
            }

            message = ScrollText(message);

            _updaterFrame.Position = this.Position;
            _updaterFrame.Size     = this.Size;
            _updaterFrame.Draw();
            _textPosition.X = this.X + (int)XOffset + 20;
            _textPosition.Y = this.Y + 25;


            FontManager.DrawString(message, "DefaultFont", _textPosition, Color.White,
                                   FontAlign.Left);
        }
Exemplo n.º 21
0
        public void Draw(double phraseNumber)
        {
            if (_middleSprite == null)
            {
                InitSprites();
            }
            if (ScoreHistory == null)
            {
                return;
            }

            UpdateDisplayedScores(phraseNumber);
            var position = this.Position.Clone();


            var maxScore = GetCombinedScore();

            if (_displayedRecordScore == 0)
            {
                return;
            }
            var ratio = 1.0 * maxScore / _displayedRecordScore;

            SetOpacity(ratio, phraseNumber);
            var drawColor = Color.Black;

            drawColor.A                  = (byte)Opacity;
            position.X                  += this.Width - _headerSprite.Width;
            _headerSprite.Position       = position.Clone();
            _headerSprite.ColorShading.A = (byte)Opacity;
            _headerSprite.Draw();

            var textPosition = new Vector2(this.X + this.Width - RIGHT_SIDE_WIDTH / 2, this.Y - 13 + (_headerSprite.Height / 2));

            FontManager.DrawString(string.Format("{0:F0}", _displayedRecordScore), "DefaultFont", textPosition, drawColor, FontAlign.Center);
            position.X  = this.X;
            position.Y += 30;
            DrawChallenges((long)_displayedRecordScore, position);
        }
Exemplo n.º 22
0
        private void DrawSingleBar(Vector2 position, int player, long challengeScore, long recordScore)
        {
            position = position.Clone();
            _rightSprite.ColorShading.A          =
                _leftSpriteMap.ColorShading.A    =
                    _middleSprite.ColorShading.A = (byte)Opacity;
            _rightSprite.Position = position.Clone();
            _rightSprite.Size     = new Vector2(RIGHT_SIDE_WIDTH, this.Height);
            _rightSprite.X       += this.Width - RIGHT_SIDE_WIDTH;
            var barWidth = this.Width - LEFT_SIDE_WIDTH - RIGHT_SIDE_WIDTH;

            var idx = (player < 5 && GameCore.Instance.Players[player].IsCPUPlayer) ? 4 : player;

            _leftSpriteMap.Draw(idx, LEFT_SIDE_WIDTH, this.Height, position);
            position.X            += LEFT_SIDE_WIDTH;
            _middleSprite.Width    = barWidth;
            _middleSprite.Height   = this.Height;
            _middleSprite.Position = position.Clone();

            _partsSpriteMap.ColorShading.A = (byte)Opacity;

            var ratio = 1.0 * challengeScore / recordScore;

            ratio = Math.Max(Math.Min(1.2, ratio), 0.8);
            var width = barWidth * (ratio - 0.8) / 0.4;

            _partsSpriteMap.Draw(GetBarColour(ratio), (float)width, this.Height, position);

            _middleSprite.Draw();
            _rightSprite.Draw();
            _rightSprite.X += RIGHT_SIDE_WIDTH / 2;
            _rightSprite.Y += (this.Height / 2) - 10;
            var textColour = Color.Black;

            textColour.A = (byte)Opacity;
            FontManager.DrawString("" + challengeScore, "DefaultFont", _rightSprite.Position, textColour,
                                   FontAlign.Center);
        }
Exemplo n.º 23
0
        private void DrawControlHelp()
        {
            var position = this.Position.Clone();

            position.X += this.Width / 2.0f;
            position.Y += FileList.ItemSpacing * FileList.MaxVisibleItems;
            position.Y += 110;

            string[] instructions =
            {
                "Use UP and DOWN to select a file or folder.",
                "\nUse START to pick a file or folder.",
                "\nUse LEFT or the '..' option to go up a folder.",
                "\nPress SELECT to pick a different drive."
            };

            foreach (var line in instructions)
            {
                FontManager.DrawString(line, "DefaultFont", position, Color.Black,
                                       FontAlign.Center);
                position.Y += 20;
            }
        }
Exemplo n.º 24
0
        public override void Draw()
        {
            CalculatePositions();
            SetOpacity();
            _baseSprite.Draw();
            if (HighScoreEntry == null)
            {
                FontManager.DrawString("No score", "TwoTech24", _namePosition, _textColor,
                                       FontAlign.Center);
                return;
            }

            var displayedName = String.IsNullOrEmpty(HighScoreEntry.Name) ? "GUEST" : HighScoreEntry.Name;

            _gradeSpriteMap.Draw(HighScoreEntry.Grade, 71, 25, _gradePosition);
            _difficultySpriteMap.Draw((int)HighScoreEntry.Difficulty + 1, 25, 25, _difficultyPosition);
            var displayedScore = string.Format("{0:N0}", HighScoreEntry.Score).Replace((char)160, ',');

            FontManager.DrawString(displayedScore, "TwoTech24", _scorePosition, _textColor,
                                   FontAlign.Center);
            FontManager.DrawString("" + displayedName, "TwoTech24", _namePosition, _textColor,
                                   FontAlign.Center);
        }
Exemplo n.º 25
0
        public override void Draw()
        {
            if (Active)
            {
                _activeOpacity = Math.Min(_activeOpacity + (FADEIN_SPEED * TextureManager.LastGameTime.ElapsedRealTime.TotalSeconds), 255);
            }
            else
            {
                _activeOpacity = Math.Max(_activeOpacity - (FADEOUT_SPEED * TextureManager.LastGameTime.ElapsedRealTime.TotalSeconds), 0);
            }

            SetSpritePositions();
            _backgroundSprite.Draw();
            _textPosition.X = this.X + (this.Width / 2);
            _textPosition.Y = this.Y;
            FontManager.DrawString("" + SongSortMode, "TwoTechLarge", _textPosition, Color.Black, FontAlign.Center);

            _arrowSprites.ColorShading.A = (byte)_activeOpacity;
            _arrowSprites.Draw(1, 35, 35, this.X + 15, this.Y + 8);
            _arrowSprites.Draw(0, 35, 35, this.X + this.Width - 40, this.Y + 8);

            DrawList();
        }
Exemplo n.º 26
0
        private void DrawChangeControls()
        {
            _indicatorArrows.ColorShading.A = (byte)_optionControlOpacity;
            _indicatorArrows.Draw(1, 15, 15, _difficultyTextPosition.X, _difficultyTextPosition.Y + 22);
            _indicatorArrows.Draw(0, 15, 15, _difficultyTextPosition.X + 15, _difficultyTextPosition.Y + 22);
            _indicatorArrows.Draw(2, 15, 15, _speedTextPosition.X - 32, _speedTextPosition.Y - 10);
            _indicatorArrows.Draw(3, 15, 15, _speedTextPosition.X - 17, _speedTextPosition.Y - 10);
            var speedText = string.Format("{0:0.0}x", Player.PlayerOptions.BeatlineSpeed);

            _textColor.A = (byte)_optionControlOpacity;
            FontManager.DrawString(speedText, "TwoTech20", _speedTextPosition, _textColor,
                                   FontAlign.Right);

            FontManager.DrawString("" + Player.PlayerOptions.PlayDifficulty, "TwoTech20", _difficultyTextPosition, _textColor,
                                   FontAlign.Left);

            if (Player.Profile != null)
            {
                FontManager.DrawString(String.Format("{0}/{1}", Player.GetEXP(), Player.GetNextEXPSafe()),
                                       "TwoTech20", _expTextPosition, _textColor,
                                       FontAlign.Center);
            }
        }
Exemplo n.º 27
0
        public override void Draw()
        {
            _backgroundSprite.Width    = this.Width;
            _backgroundSprite.Height   = this.Height;
            _backgroundSprite.Position = this.Position;
            _backgroundSprite.Draw();

            //Determine positions.
            _textPosition    = this.Position.Clone();
            _textPosition.X += 60;
            _textPosition.Y += 13;
            _iconPosition    = this.Position.Clone();
            _iconPosition.X += 10;
            _iconPosition.Y += 12;

            //Draw controller Icon
            if (ControllerNumber > 0)
            {
                _controllerNumberSpriteMap.Draw(ControllerNumber - 1, 30, 30, _iconPosition);
                if (_buttonsLookup.Contains(Button))
                {
                    _textPosition.Y -= 3;
                    var btnIndex = _buttonsLookup.IndexOf(Button);
                    _controllerButtonsSpriteMap.Draw(btnIndex, 30, 30, _textPosition);
                }
                else
                {
                    FontManager.DrawString(Button.ToString(), "LargeFont", _textPosition, Color.Black, FontAlign.Left);
                }
            }
            else
            {
                _keyboardIcon.Position = _iconPosition;
                _keyboardIcon.Draw();
                FontManager.DrawString(Key.ToString(), "LargeFont", _textPosition, Color.Black, FontAlign.Left);
            }
        }
Exemplo n.º 28
0
 private void DrawText()
 {
     FontManager.DrawString(String.Format("{0:D3}", (int)_displayedLife),
                            "DefaultFont", _textPosition, Color.Black, FontAlign.Center);
 }