Exemplo n.º 1
0
 private void UpdatePlayerNumber()
 {
     CConfig.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1;
     CGame.NumPlayer   = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1;
     for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
     {
         if (i <= CGame.NumPlayer)
         {
             Statics[htStatics("StaticPlayer" + i)].Visible       = true;
             Statics[htStatics("StaticPlayerAvatar" + i)].Visible = true;
             Texts[htTexts("TextPlayer" + i)].Visible             = true;
             if (Texts[htTexts("TextPlayer" + i)].Text == string.Empty)
             {
                 Texts[htTexts("TextPlayer" + i)].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + i.ToString();
             }
             Equalizers[htEqualizer("EqualizerPlayer" + i)].Visible = true;
             if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet)
             {
                 SelectSlides[htSelectSlides("SelectSlideDuetPlayer" + i)].Visible = true;
             }
         }
         else
         {
             Statics[htStatics("StaticPlayer" + i)].Visible                    = false;
             Statics[htStatics("StaticPlayerAvatar" + i)].Visible              = false;
             Texts[htTexts("TextPlayer" + i)].Visible                          = false;
             Equalizers[htEqualizer("EqualizerPlayer" + i)].Visible            = false;
             SelectSlides[htSelectSlides("SelectSlideDuetPlayer" + i)].Visible = false;
         }
     }
     CConfig.SaveConfig();
     CheckMics();
     CheckPlayers();
 }
Exemplo n.º 2
0
        public override void OnShow()
        {
            base.OnShow();

            //Check if there is a mic-configuration
            if (!CConfig.IsMicConfig())
            {
                //If not, try to assaign players 1 and 2 automatically to usb-mics
                if (CConfig.AutoAssignMics())
                {
                    //Save config
                    CConfig.SaveConfig();
                }
            }

            _SongLoaderThread      = new Thread(new ThreadStart(CSongs.LoadSongs));
            _SongLoaderThread.Name = "SongLoader";

            Texts[htTexts(TextStatus)].Text = CLanguage.Translate("TR_SCREENLOAD_TOTAL") + ": 0 " +
                                              CLanguage.Translate("TR_SCREENLOAD_SONGS") + " (0 " +
                                              CLanguage.Translate("TR_SCREENLOAD_LOADED") + ")";

            _SkipIntro           = false;
            _CurrentIntroVideoNr = -1;
            _IntroOutPlayed      = false;

            if (CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON)
            {
                for (int i = 0; i < _Intros.Length; i++)
                {
                    _Intros[i].Load(IntroVideo[i]);
                }
            }
        }
Exemplo n.º 3
0
        public override bool UpdateGame()
        {
            _CheckStartIntroVideos();

            bool next = CConfig.Config.Theme.CoverLoading != ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART || CSongs.CoverLoaded;

            if ((_IntroOutPlayed || _SkipIntro) && next && CSettings.ProgramState == EProgramState.Start && CSongs.SongsLoaded)
            {
                CSettings.ProgramState = EProgramState.Normal;
                CGraphics.FadeTo(EScreen.Main);
            }

            _Texts[_TextStatus].Text =
                CLanguage.Translate("TR_SCREENLOAD_TOTAL") + ": " + CSongs.NumAllSongs + " " +
                CLanguage.Translate("TR_SCREENLOAD_SONGS") + " (" + CSongs.NumSongsWithCoverLoaded + " " +
                CLanguage.Translate("TR_SCREENLOAD_LOADED") + ")";

            if (CSongs.SongsLoaded && !CBackgroundMusic.OwnSongsAvailable)
            {
                CBackgroundMusic.OwnSongsAvailable = true;

                if (CConfig.Config.Video.VideoBackgrounds == EOffOn.TR_CONFIG_ON || CConfig.Config.Video.VideosToBackground == EOffOn.TR_CONFIG_ON)
                {
                    CBackgroundMusic.VideoEnabled = true;
                }

                CBackgroundMusic.Play();
            }

            return(true);
        }
Exemplo n.º 4
0
        private void _UpdateChannels()
        {
            int max = _Devices[_DeviceNr].Channels + 1;

            for (int p = 0; p < CSettings.MaxNumPlayer; ++p)
            {
                _SelectSlides[_SelectSlideRecordPlayer[p]].Clear();
                _SelectSlides[_SelectSlideRecordPlayer[p]].NumVisible = max;
                _SelectSlides[_SelectSlideRecordPlayer[p]].AddValue(CLanguage.Translate("TR_CONFIG_OFF"));
            }

            for (int i = 1; i <= _Devices[_DeviceNr].Channels; ++i)
            {
                for (int p = 0; p < CSettings.MaxNumPlayer; ++p)
                {
                    _SelectSlides[_SelectSlideRecordPlayer[p]].AddValue(i.ToString());
                }

                int pc = _Devices[_DeviceNr].PlayerChannel[i - 1];
                if (pc > 0)
                {
                    _SelectSlides[_SelectSlideRecordPlayer[pc - 1]].Selection = i;
                }
            }

            _SaveMicConfig();
        }
Exemplo n.º 5
0
 public RectangleF GetTextBounds(CText text, float Height)
 {
     CFonts.Height = Height;
     CFonts.SetFont(text.Fon);
     CFonts.Style = text.Style;
     return(new RectangleF(text.X, text.Y, CFonts.GetTextWidth(CLanguage.Translate(text.Text)), CFonts.GetTextHeight(CLanguage.Translate(text.Text))));
 }
Exemplo n.º 6
0
        public override void OnShow()
        {
            base.OnShow();

            //Check if there is a mic-configuration
            if (!CConfig.IsMicConfig())
            {
                //If not, try to assaign players 1 and 2 automatically to usb-mics
                if (CConfig.AutoAssignMics())
                {
                    //Save config
                    CConfig.SaveConfig();
                }
            }

            _Texts[_TextStatus].Text = CLanguage.Translate("TR_SCREENLOAD_TOTAL") + ": 0 " +
                                       CLanguage.Translate("TR_SCREENLOAD_SONGS") + " (0 " +
                                       CLanguage.Translate("TR_SCREENLOAD_LOADED") + ")";

            _SkipIntro         = false;
            _CurrentIntroVideo = -1;
            _IntroOutPlayed    = false;

            if (CConfig.Config.Video.VideoBackgrounds == EOffOn.TR_CONFIG_ON)
            {
                for (int i = 0; i < _Intros.Length; i++)
                {
                    _Intros[i].Load(_IntroVideo[i]);
                }
                _Texts[_TextProgramName].Visible = false;
            }
        }
Exemplo n.º 7
0
 private void UpdateSlides()
 {
     SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Clear();
     for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
     {
         SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].AddValue(CLanguage.Translate("TR_SCREENNAMES_" + i + "PLAYER"));
     }
     SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1;
 }
Exemplo n.º 8
0
 private void _UpdateSlides()
 {
     _SelectSlides[_SelectSlidePlayerNumber].Clear();
     for (int i = 1; i <= CConfig.Config.Graphics.NumScreens * CSettings.MaxScreenPlayer; i++)
     {
         _SelectSlides[_SelectSlidePlayerNumber].AddValue(CLanguage.Translate("TR_SCREENNAMES_" + i + "PLAYER"));
     }
     _SelectSlides[_SelectSlidePlayerNumber].Selection = CConfig.Config.Game.NumPlayers - 1;
 }
Exemplo n.º 9
0
        private void _UpdateChannels()
        {
            _SelectSlides[_EditSelectSlideRecordChannels].Clear();
            _SelectSlides[_EditSelectSlideRecordChannels].AddValue(CLanguage.Translate("TR_CONFIG_OFF"));

            for (int i = 1; i <= _Devices[_DeviceNr].Channels; ++i)
            {
                _SelectSlides[_EditSelectSlideRecordChannels].AddValue(i.ToString());
            }

            _SaveMicConfig();
        }
Exemplo n.º 10
0
        private void _CheckPlayers()
        {
            var playerWithoutProfile = new List <int>();

            for (int player = 0; player < CConfig.Config.Game.NumPlayers; player++)
            {
                if (CGame.Players[player].ProfileID == Guid.Empty)
                {
                    playerWithoutProfile.Add(player + 1);
                }
            }

            if (playerWithoutProfile.Count > 0)
            {
                _Statics[_StaticWarningProfiles].Visible = true;
                _Texts[_TextWarningProfiles].Visible     = true;

                if (playerWithoutProfile.Count > 1)
                {
                    string playerNums = string.Empty;
                    for (int i = 0; i < playerWithoutProfile.Count; i++)
                    {
                        if (playerWithoutProfile.Count - 1 == i)
                        {
                            playerNums += playerWithoutProfile[i].ToString();
                        }
                        else if (playerWithoutProfile.Count - 2 == i)
                        {
                            playerNums += playerWithoutProfile[i] + " " + CLanguage.Translate("TR_GENERAL_AND") + " ";
                        }
                        else
                        {
                            playerNums += playerWithoutProfile[i] + ", ";
                        }
                    }

                    _Texts[_TextWarningProfiles].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_PL").Replace("%v", playerNums);
                }
                else
                {
                    _Texts[_TextWarningProfiles].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_SG").Replace("%v", playerWithoutProfile[0].ToString());
                }
            }
            else
            {
                _Statics[_StaticWarningProfiles].Visible = false;
                _Texts[_TextWarningProfiles].Visible     = false;
            }
        }
Exemplo n.º 11
0
        private void CheckPlayers()
        {
            List <int> _PlayerWithoutProfile = new List <int>();

            for (int player = 0; player < CConfig.NumPlayer; player++)
            {
                if (CGame.Player[player].ProfileID < 0)
                {
                    _PlayerWithoutProfile.Add(player + 1);
                }
            }

            if (_PlayerWithoutProfile.Count > 0)
            {
                Statics[htStatics(StaticWarningProfiles)].Visible = true;
                Texts[htTexts(TextWarningProfiles)].Visible       = true;

                if (_PlayerWithoutProfile.Count > 1)
                {
                    string PlayerNums = string.Empty;
                    for (int i = 0; i < _PlayerWithoutProfile.Count; i++)
                    {
                        if (_PlayerWithoutProfile.Count - 1 == i)
                        {
                            PlayerNums += _PlayerWithoutProfile[i].ToString();
                        }
                        else if (_PlayerWithoutProfile.Count - 2 == i)
                        {
                            PlayerNums += _PlayerWithoutProfile[i].ToString() + " " + CLanguage.Translate("TR_GENERAL_AND") + " ";
                        }
                        else
                        {
                            PlayerNums += _PlayerWithoutProfile[i].ToString() + ", ";
                        }
                    }

                    Texts[htTexts(TextWarningProfiles)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_PL").Replace("%v", PlayerNums);
                }
                else
                {
                    Texts[htTexts(TextWarningProfiles)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_SG").Replace("%v", _PlayerWithoutProfile[0].ToString());
                }
            }
            else
            {
                Statics[htStatics(StaticWarningProfiles)].Visible = false;
                Texts[htTexts(TextWarningProfiles)].Visible       = false;
            }
        }
Exemplo n.º 12
0
        public override bool UpdateGame()
        {
            for (int p = 0; p < NumEntrys; p++)
            {
                if (_Pos + p < _Scores[_Round].Count)
                {
                    Texts[htTexts(TextNumber[p])].Visible = true;
                    Texts[htTexts(TextName[p])].Visible   = true;
                    Texts[htTexts(TextScore[p])].Visible  = true;
                    Texts[htTexts(TextDate[p])].Visible   = true;

                    Texts[htTexts(TextNumber[p])].Text = (_Pos + p + 1).ToString();

                    string name = _Scores[_Round][_Pos + p].Name;
                    name += " [" + CLanguage.Translate(Enum.GetName(typeof(EGameDifficulty), _Scores[_Round][_Pos + p].Difficulty)) + "]";
                    if (_IsDuet)
                    {
                        name += " (P" + (_Scores[_Round][_Pos + p].LineNr + 1).ToString() + ")";
                    }
                    Texts[htTexts(TextName[p])].Text = name;

                    Texts[htTexts(TextScore[p])].Text = _Scores[_Round][_Pos + p].Score.ToString("00000");
                    Texts[htTexts(TextDate[p])].Text  = _Scores[_Round][_Pos + p].Date;

                    if (isNewEntry(_Scores[_Round][_Pos + p].ID) == true)
                    {
                        Texts[htTexts(TextNumber[p])].Style = EStyle.BoldItalic;
                        Texts[htTexts(TextName[p])].Style   = EStyle.BoldItalic;
                        Texts[htTexts(TextScore[p])].Style  = EStyle.BoldItalic;
                        Texts[htTexts(TextDate[p])].Style   = EStyle.BoldItalic;
                    }
                    else
                    {
                        Texts[htTexts(TextNumber[p])].Style = EStyle.Bold;
                        Texts[htTexts(TextName[p])].Style   = EStyle.Bold;
                        Texts[htTexts(TextScore[p])].Style  = EStyle.Bold;
                        Texts[htTexts(TextDate[p])].Style   = EStyle.Bold;
                    }
                }
                else
                {
                    Texts[htTexts(TextNumber[p])].Visible = false;
                    Texts[htTexts(TextName[p])].Visible   = false;
                    Texts[htTexts(TextScore[p])].Visible  = false;
                    Texts[htTexts(TextDate[p])].Visible   = false;
                }
            }
            return(true);
        }
Exemplo n.º 13
0
        private void _CheckMics()
        {
            var playerWithoutMicro = new List <int>();

            for (int player = 0; player < CConfig.Config.Game.NumPlayers; player++)
            {
                if (!CConfig.IsMicConfig(player + 1))
                {
                    playerWithoutMicro.Add(player + 1);
                }
            }
            if (playerWithoutMicro.Count > 0)
            {
                _Statics[_StaticWarningMics].Visible = true;
                _Texts[_TextWarningMics].Visible     = true;

                if (playerWithoutMicro.Count > 1)
                {
                    string playerNums = string.Empty;
                    for (int i = 0; i < playerWithoutMicro.Count; i++)
                    {
                        if (playerWithoutMicro.Count - 1 == i)
                        {
                            playerNums += playerWithoutMicro[i].ToString();
                        }
                        else if (playerWithoutMicro.Count - 2 == i)
                        {
                            playerNums += playerWithoutMicro[i] + " " + CLanguage.Translate("TR_GENERAL_AND") + " ";
                        }
                        else
                        {
                            playerNums += playerWithoutMicro[i] + ", ";
                        }
                    }

                    _Texts[_TextWarningMics].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_PL").Replace("%v", playerNums);
                }
                else
                {
                    _Texts[_TextWarningMics].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_SG").Replace("%v", playerWithoutMicro[0].ToString());
                }
            }
            else
            {
                _Statics[_StaticWarningMics].Visible = false;
                _Texts[_TextWarningMics].Visible     = false;
            }
        }
Exemplo n.º 14
0
        private void CheckMics()
        {
            List <int> _PlayerWithoutMicro = new List <int>();

            for (int player = 0; player < CConfig.NumPlayer; player++)
            {
                if (!CConfig.IsMicConfig(player + 1))
                {
                    _PlayerWithoutMicro.Add(player + 1);
                }
            }
            if (_PlayerWithoutMicro.Count > 0)
            {
                Statics[htStatics(StaticWarningMics)].Visible = true;
                Texts[htTexts(TextWarningMics)].Visible       = true;

                if (_PlayerWithoutMicro.Count > 1)
                {
                    string PlayerNums = string.Empty;
                    for (int i = 0; i < _PlayerWithoutMicro.Count; i++)
                    {
                        if (_PlayerWithoutMicro.Count - 1 == i)
                        {
                            PlayerNums += _PlayerWithoutMicro[i].ToString();
                        }
                        else if (_PlayerWithoutMicro.Count - 2 == i)
                        {
                            PlayerNums += _PlayerWithoutMicro[i].ToString() + " " + CLanguage.Translate("TR_GENERAL_AND") + " ";
                        }
                        else
                        {
                            PlayerNums += _PlayerWithoutMicro[i].ToString() + ", ";
                        }
                    }

                    Texts[htTexts(TextWarningMics)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_PL").Replace("%v", PlayerNums);
                }
                else
                {
                    Texts[htTexts(TextWarningMics)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_SG").Replace("%v", _PlayerWithoutMicro[0].ToString());
                }
            }
            else
            {
                Statics[htStatics(StaticWarningMics)].Visible = false;
                Texts[htTexts(TextWarningMics)].Visible       = false;
            }
        }
Exemplo n.º 15
0
        public override bool UpdateGame()
        {
            CheckStartIntroVideos();

            if (CSettings.GameState == EGameState.EditTheme)
            {
                _timer.Stop();
            }
            else
            {
                _timer.Start();
            }

            bool next = ((CConfig.CoverLoading == ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART && CSongs.CoverLoaded) ||
                         CConfig.CoverLoading != ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART);

            if ((_IntroOutPlayed || _SkipIntro) && next && CSettings.GameState != EGameState.EditTheme && CSongs.SongsLoaded)
            {
                CSettings.GameState = EGameState.Normal;
            }

            if (CSettings.GameState == EGameState.Normal)
            {
                CGraphics.FadeTo(EScreens.ScreenMain);
            }

            Texts[htTexts(TextStatus)].Text =
                CLanguage.Translate("TR_SCREENLOAD_TOTAL") + ": " + CSongs.NumAllSongs.ToString() + " " +
                CLanguage.Translate("TR_SCREENLOAD_SONGS") + " (" + CSongs.NumSongsWithCoverLoaded + " " +
                CLanguage.Translate("TR_SCREENLOAD_LOADED") + ")";

            if (CSongs.SongsLoaded && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON &&
                CConfig.BackgroundMusicSource != EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC && !_BGMusicStartet)
            {
                CBackgroundMusic.AddOwnMusic();

                if (!CBackgroundMusic.Playing)
                {
                    CBackgroundMusic.Next();
                }

                _BGMusicStartet = true;
            }

            return(true);
        }
Exemplo n.º 16
0
        private void UpdateRatings()
        {
            CSong song = CGame.GetSong(_Round);

            if (song == null)
            {
                return;
            }

            Texts[htTexts(TextSong)].Text = song.Artist + " - " + song.Title;
            if (_Points.NumRounds > 1)
            {
                Texts[htTexts(TextSong)].Text += " (" + _Round + "/" + _Points.NumRounds + ")";
            }

            SPlayer[] player = new SPlayer[CGame.NumPlayer];
            player = _Points.GetPlayer(_Round - 1, CGame.NumPlayer);
            for (int p = 0; p < player.Length; p++)
            {
                Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text      = player[p].Name;
                Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Text     = ((int)Math.Round(player[p].Points)).ToString("0000") + " " + CLanguage.Translate("TR_SCREENSCORE_POINTS");
                Texts[htTexts(TextRatings[p, CGame.NumPlayer - 1])].Text    = CLanguage.Translate("TR_SCREENSCORE_RATING") + ": " + CLanguage.Translate(GetRating((int)Math.Round(player[p].Points)));
                Texts[htTexts(TextDifficulty[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate("TR_SCREENSCORE_GAMEDIFFICULTY") + ": " + CLanguage.Translate(player[p].Difficulty.ToString());
                StaticPointsBarDrawnPoints[p] = 0.0;
                Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H = 0;
                Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.Y = Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H + Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.Y - Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H;
                if (player[p].ProfileID >= 0 && player[p].ProfileID < CProfiles.NumProfiles)
                {
                    Statics[htStatics(StaticAvatar[p, CGame.NumPlayer - 1])].Texture = CProfiles.Profiles[player[p].ProfileID].Avatar.Texture;
                }
            }

            if (CConfig.ScoreAnimationTime < 1)
            {
                for (int p = 0; p < CGame.NumPlayer; p++)
                {
                    Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H = ((float)player[p].Points) * (Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H / 10000);
                    Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.Y = Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H + Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.Y - Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H;
                    StaticPointsBarDrawnPoints[p] = player[p].Points;
                }
            }

            timer = new Stopwatch();
            timer.Start();
        }
Exemplo n.º 17
0
        public override void LoadTheme(string xmlPath)
        {
            base.LoadTheme(xmlPath);

            for (int i = 0; i < 26; i++)
            {
                _SelectSlides[_SelectSlideDelay].AddValue((i * 20) + " ms");
            }

            _ChannelEnergy = new float[_StaticEnergyPlayer.Length];

            for (int p = 0; p < CSettings.MaxNumPlayer; p++)
            {
                _Statics[_StaticEnergyPlayer[p]].Visible = false;
                _Texts[_TextPlayer[p]].Text      = CLanguage.Translate("TR_SCREENORECORD_PLAYER_N").Replace("%n", (p + 1).ToString());
                _Texts[_TextDelayPlayer[p]].Text = "––– ms";
                _ChannelEnergy[p] = 0f;
            }
        }
Exemplo n.º 18
0
        /// <summary>
        /// Initilaize the gui.
        /// </summary>
        /// <param name="log">The Log to submit.</param>
        /// <param name="lastError">The last error message.</param>
        private void _Init(string log, string lastError)
        {
            // Try to load localized strings
            try
            {
                _TitleText               = CLanguage.Translate("TR_REPORTER_TITLE_TEXT");
                _MessageCrashText        = CLanguage.Translate("TR_REPORTER_MESSAGE_CRASH_TEXT").Replace("\\n", "\n").Replace("\\r", "\r");
                _MessageNoCrashText      = CLanguage.Translate("TR_REPORTER_MESSAGE_NO_CRASH_TEXT").Replace("\\n", "\n").Replace("\\r", "\r");
                _NoUploadText            = CLanguage.Translate("TR_REPORTER_NO_UPLOAD_TEXT");
                _GistAndIssueText        = CLanguage.Translate("TR_REPORTER_GIST_AND_ISSUE_TEXT");
                _GistOnlyText            = CLanguage.Translate("TR_REPORTER_GIST_ONLY_TEXT");
                _SubmitStep0Text         = CLanguage.Translate("TR_REPORTER_SUBMIT_STEP0_TEXT");
                _SubmitStep1Text         = CLanguage.Translate("TR_REPORTER_SUBMIT_STEP1_TEXT");
                _SubmitStep2ExitText     = CLanguage.Translate("TR_REPORTER_SUBMIT_STEP2_EXIT_TEXT");
                _SubmitStep2ContinueText = CLanguage.Translate("TR_REPORTER_SUBMIT_STEP2_CONTINUE_TEXT");
                _SubmitedMessageText     = CLanguage.Translate("TR_REPORTER_SUBMITED_MESSAGE_TEXT");
                _LogUploadErrorText      = CLanguage.Translate("TR_REPORTER_LOGUPLOAD_ERROR_TEXT");
                _LastErrorTitleText      = CLanguage.Translate("TR_REPORTER_LAST_ERROR_TITLE_TEXT");
                _LastErrorNa             = CLanguage.Translate("TR_REPORTER_LAST_ERROR_NA");
                _IssueTemplate           = CLanguage.Translate("TR_REPORTER_ISSUE_TEMPLATE").Replace("\\n", "\n").Replace("\\r", "\r");
            }
            catch (Exception e)
            {
#if DEBUG
                Console.WriteLine($"Unable to load translation for report assistant: {e.Message}");
#endif
            }

            _Client.DefaultRequestHeaders.Add("accept", "application/json");
            _Client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)");

            this.TitleLabel.Text          = _TitleText;
            this.MessageText.Text         = _Crash ? _MessageCrashText : _MessageNoCrashText;
            this.NoUploadSelect.Text      = _NoUploadText;
            this.GistAndIssueSelect.Text  = _GistAndIssueText;
            this.GistOnlySelect.Text      = _GistOnlyText;
            this.SubmitButton.Text        = _SubmitStep0Text;
            this.SubmitedTitleLabel.Text  = _SubmitedMessageText;
            this.LastErrorTitleLabel.Text = _LastErrorTitleText;
            this.LastErrorBox.Text        = string.IsNullOrWhiteSpace(lastError) ? _LastErrorNa : lastError;
            this.LogBox.Text           = log.Replace("\n", "\r\n");
            this.LogBox.SelectionStart = 0;
        }
Exemplo n.º 19
0
        private void _UpdatePlayerTexts()
        {
            for (int p = 0; p < CSettings.MaxNumPlayer; ++p)
            {
                _Texts[_TextChannelPlayer[p]].Text     = "–";
                _Texts[_TextChannelPlayer[p]].Selected = _Buttons[_ButtonsPlayer[p]].Selected;
                _Texts[_TextDevicePlayer[p]].Text      = CLanguage.Translate("TR_SCREENORECORD_PRESS_TO_CONFIGURE");
                _Texts[_TextDevicePlayer[p]].Selected  = _Buttons[_ButtonsPlayer[p]].Selected;
            }

            foreach (CRecordDevice device in _Devices)
            {
                for (int c = 0; c < device.Channels; c++)
                {
                    if (device.PlayerChannel[c] > 0)
                    {
                        _Texts[_TextChannelPlayer[device.PlayerChannel[c] - 1]].Text = CConfig.Config.Record.MicConfig[device.PlayerChannel[c] - 1].Channel.ToString();
                        _Texts[_TextDevicePlayer[device.PlayerChannel[c] - 1]].Text  = CConfig.Config.Record.MicConfig[device.PlayerChannel[c] - 1].DeviceName;
                    }
                }
            }
        }
Exemplo n.º 20
0
        public override void LoadTheme()
        {
            base.LoadTheme();

            int max = CSettings.MaxNumPlayer + 1;

            if (max > 7)
            {
                max = 7;
            }

            SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].NumVisible = max;
            SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].NumVisible = max;

            SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].AddValue(CLanguage.Translate("TR_CONFIG_OFF"));
            SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].AddValue(CLanguage.Translate("TR_CONFIG_OFF"));

            for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
            {
                SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].AddValue(i.ToString());
                SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].AddValue(i.ToString());
            }

            for (int i = 0; i < 26; i++)
            {
                SelectSlides[htSelectSlides(SelectSlideDelay)].AddValue((i * 20).ToString() + " ms");
            }

            ChannelEnergy = new float[StaticEnergyChannel.Length];

            for (int i = 0; i < ChannelEnergy.Length; i++)
            {
                Statics[htStatics(StaticEnergyChannel[i])].Visible = false;
                ChannelEnergy[i] = 0f;
            }

            Equalizers[htEqualizer(EqualizerChannel1)].ScreenHandles = true;
            Equalizers[htEqualizer(EqualizerChannel2)].ScreenHandles = true;
        }
Exemplo n.º 21
0
        public override bool UpdateGame()
        {
            for (int p = 0; p < _NumEntrys; p++)
            {
                if (_Pos + p < _Scores[_Round].Count)
                {
                    _Texts[_TextNumber[p]].Visible = true;
                    _Texts[_TextName[p]].Visible   = true;
                    _Texts[_TextScore[p]].Visible  = true;
                    _Texts[_TextDate[p]].Visible   = true;

                    _Texts[_TextNumber[p]].Text = (_Pos + p + 1).ToString();

                    string name = _Scores[_Round][_Pos + p].Name;
                    name += " [" + CLanguage.Translate(Enum.GetName(typeof(EGameDifficulty), _Scores[_Round][_Pos + p].Difficulty)) + "]";
                    if (_IsDuet)
                    {
                        name += " (P" + (_Scores[_Round][_Pos + p].VoiceNr + 1) + ")";
                    }
                    _Texts[_TextName[p]].Text = name;

                    _Texts[_TextScore[p]].Text = _Scores[_Round][_Pos + p].Score.ToString("D");
                    _Texts[_TextDate[p]].Text  = _Scores[_Round][_Pos + p].Date;

                    _ParticleEffects[_ParticleEffectNew[p]].Visible = _IsNewEntry(_Scores[_Round][_Pos + p].ID);
                }
                else
                {
                    _Texts[_TextNumber[p]].Visible = false;
                    _Texts[_TextName[p]].Visible   = false;
                    _Texts[_TextScore[p]].Visible  = false;
                    _Texts[_TextDate[p]].Visible   = false;
                    _ParticleEffects[_ParticleEffectNew[p]].Visible = false;
                }
            }
            return(true);
        }
Exemplo n.º 22
0
        private void _UpdateSelection()
        {
            if (_PartyModeInfos.Count == 0)
            {
                return;
            }

            int index = _SelectSlides[_SelectSlideModes].Selection;

            if (index >= _PartyModeInfos.Count)
            {
                index = 0;
                _SelectSlides[_SelectSlideModes].Selection = 0;
            }

            //Description
            SPartyModeInfos infos   = _PartyModeInfos[index];
            IPartyModeInfo  extInfo = infos.ExtInfo;

            _Texts[_TextDescription].Text          = infos.Description;
            _Texts[_TextDescription].TranslationID = extInfo.ID;

            //TargetAudience
            _Texts[_TextTargetAudience].TranslationID = extInfo.ID;
            _Texts[_TextTargetAudience].Text          = infos.TargetAudience;

            //NumTeams
            if (extInfo.MaxTeams == 1)
            {
                _Texts[_TextNumTeams].Text = "TR_SCREENPARTY_NOTEAMS";
            }
            else if (extInfo.MaxTeams == extInfo.MinTeams)
            {
                _Texts[_TextNumTeams].Text = extInfo.MaxTeams.ToString();
            }
            else
            {
                _Texts[_TextNumTeams].Text = extInfo.MinTeams + " - " + extInfo.MaxTeams;
            }

            //NumPlayers
            if (extInfo.MaxPlayers == extInfo.MinPlayers)
            {
                _Texts[_TextNumPlayers].Text = extInfo.MaxTeams.ToString();
            }
            else
            {
                _Texts[_TextNumPlayers].Text = extInfo.MinPlayers + " - " + extInfo.MaxPlayers;
            }

            //Author
            _Texts[_TextAuthor].Text          = infos.Author;
            _Texts[_TextAuthor].TranslationID = extInfo.ID;

            //Version
            _Texts[_TextVersion].Text          = infos.VersionMajor + "." + infos.VersionMinor;
            _Texts[_TextVersion].TranslationID = extInfo.ID;

            if (CConfig.GetMaxNumMics() < extInfo.MinMics)
            {
                _Buttons[_ButtonStart].Visible = false;
                _Texts[_TextError].Text        = CConfig.GetMaxNumMics() == 0
                                              ? "TR_SCREENPARTY_ERROR_MICS" : CLanguage.Translate("TR_SCREENPARTY_ERROR_MIC_NUM").Replace("%d", extInfo.MinMics.ToString());
                _Texts[_TextError].Visible = true;
            }
            else
            {
                _Buttons[_ButtonStart].Visible = true;
                _Texts[_TextError].Visible     = false;
            }
        }
Exemplo n.º 23
0
        public override bool HandleInput(KeyEvent KeyEvent)
        {
            switch (KeyEvent.Key)
            {
            case Keys.Add:
                if (CConfig.NumPlayer + 1 <= CSettings.MaxNumPlayer)
                {
                    SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer;
                    UpdatePlayerNumber();
                    //Update Tiles-List
                    NameSelections[htNameSelections(NameSelection)].UpdateList();
                }
                break;

            case Keys.Subtract:
                if (CConfig.NumPlayer - 1 > 0)
                {
                    SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 2;
                    UpdatePlayerNumber();
                    //Update Tiles-List
                    NameSelections[htNameSelections(NameSelection)].UpdateList();
                }
                break;

            case Keys.P:
                if (!selectingKeyboardActive)
                {
                    selectingKeyboardPlayerNr  = 1;
                    selectingKeyboardUnendless = true;
                }
                else
                {
                    if (selectingKeyboardPlayerNr + 1 <= CGame.NumPlayer)
                    {
                        selectingKeyboardPlayerNr++;
                    }
                    else
                    {
                        selectingKeyboardPlayerNr = 1;
                    }
                    NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, selectingKeyboardPlayerNr);
                }
                break;
            }
            //Check if selecting with keyboard is active
            if (selectingKeyboardActive)
            {
                //Handle left/right/up/down
                NameSelections[htNameSelections(NameSelection)].HandleInput(KeyEvent);
                switch (KeyEvent.Key)
                {
                case Keys.Enter:
                    //Check, if a player is selected
                    if (NameSelections[htNameSelections(NameSelection)].Selection > -1)
                    {
                        SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].Selection;
                        //Update Game-infos with new player
                        CGame.Player[selectingKeyboardPlayerNr - 1].Name       = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
                        CGame.Player[selectingKeyboardPlayerNr - 1].Difficulty = CProfiles.Profiles[SelectedPlayerNr].Difficulty;
                        CGame.Player[selectingKeyboardPlayerNr - 1].ProfileID  = SelectedPlayerNr;
                        //Update config for default players.
                        CConfig.Players[selectingKeyboardPlayerNr - 1] = CProfiles.Profiles[SelectedPlayerNr].ProfileFile;
                        CConfig.SaveConfig();
                        //Update texture and name
                        Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr - 1])].Texture = CProfiles.Profiles[SelectedPlayerNr].Avatar.Texture;
                        Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr - 1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
                        //Update profile-warning
                        CheckPlayers();
                        //Update Tiles-List
                        NameSelections[htNameSelections(NameSelection)].UpdateList();
                        SetInteractionToButton(Buttons[htButtons(ButtonStart)]);
                    }
                    //Started selecting with 'P'
                    if (selectingKeyboardUnendless)
                    {
                        if (selectingKeyboardPlayerNr == CGame.NumPlayer)
                        {
                            //Reset all values
                            selectingKeyboardPlayerNr = 0;
                            selectingKeyboardActive   = false;
                            NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                        }
                        else
                        {
                            selectingKeyboardPlayerNr++;
                            NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, selectingKeyboardPlayerNr);
                        }
                    }
                    else
                    {
                        //Reset all values
                        selectingKeyboardPlayerNr = 0;
                        selectingKeyboardActive   = false;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                    }
                    break;

                case Keys.D1:
                case Keys.NumPad1:
                    if (selectingKeyboardPlayerNr == 1)
                    {
                        //Reset all values
                        selectingKeyboardPlayerNr = 0;
                        selectingKeyboardActive   = false;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                    }
                    else
                    {
                        selectingKeyboardPlayerNr = 1;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 1);
                    }
                    selectingKeyboardUnendless = false;
                    break;

                case Keys.D2:
                case Keys.NumPad2:
                    if (selectingKeyboardPlayerNr == 2)
                    {
                        //Reset all values
                        selectingKeyboardPlayerNr = 0;
                        selectingKeyboardActive   = false;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                    }
                    else
                    {
                        selectingKeyboardPlayerNr = 2;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 2);
                    }
                    selectingKeyboardUnendless = false;
                    break;

                case Keys.D3:
                case Keys.NumPad3:
                    if (selectingKeyboardPlayerNr == 3)
                    {
                        //Reset all values
                        selectingKeyboardPlayerNr = 0;
                        selectingKeyboardActive   = false;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                    }
                    else
                    {
                        selectingKeyboardPlayerNr = 3;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 3);
                    }
                    selectingKeyboardUnendless = false;
                    break;

                case Keys.D4:
                case Keys.NumPad4:
                    if (selectingKeyboardPlayerNr == 4)
                    {
                        //Reset all values
                        selectingKeyboardPlayerNr = 0;
                        selectingKeyboardActive   = false;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                    }
                    else
                    {
                        selectingKeyboardPlayerNr = 4;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 4);
                    }
                    selectingKeyboardUnendless = false;
                    break;

                case Keys.D5:
                case Keys.NumPad5:
                    if (selectingKeyboardPlayerNr == 5)
                    {
                        //Reset all values
                        selectingKeyboardPlayerNr = 0;
                        selectingKeyboardActive   = false;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                    }
                    else
                    {
                        selectingKeyboardPlayerNr = 5;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 5);
                    }
                    selectingKeyboardUnendless = false;
                    break;

                case Keys.D6:
                case Keys.NumPad6:
                    if (selectingKeyboardPlayerNr == 6)
                    {
                        //Reset all values
                        selectingKeyboardPlayerNr = 0;
                        selectingKeyboardActive   = false;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                    }
                    else
                    {
                        selectingKeyboardPlayerNr = 6;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 6);
                    }
                    selectingKeyboardUnendless = false;
                    break;

                case Keys.Escape:
                    //Reset all values
                    selectingKeyboardPlayerNr  = 0;
                    selectingKeyboardActive    = false;
                    selectingKeyboardUnendless = false;
                    NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                    break;

                case Keys.Delete:
                    //Delete profile-selection
                    CGame.Player[selectingKeyboardPlayerNr - 1].ProfileID  = -1;
                    CGame.Player[selectingKeyboardPlayerNr - 1].Name       = String.Empty;
                    CGame.Player[selectingKeyboardPlayerNr - 1].Difficulty = EGameDifficulty.TR_CONFIG_EASY;
                    //Update config for default players.
                    CConfig.Players[selectingKeyboardPlayerNr - 1] = String.Empty;
                    CConfig.SaveConfig();
                    //Update texture and name
                    Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr - 1])].Texture = OriginalPlayerAvatarTextures[selectingKeyboardPlayerNr - 1];
                    Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr - 1])].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + selectingKeyboardPlayerNr.ToString();
                    //Update profile-warning
                    CheckPlayers();
                    //Reset all values
                    selectingKeyboardPlayerNr = 0;
                    selectingKeyboardActive   = false;
                    NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                    //Update Tiles-List
                    NameSelections[htNameSelections(NameSelection)].UpdateList();
                    break;

                case Keys.F10:
                    if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet)
                    {
                        if (SelectSlides[htSelectSlides(SelectSlideDuetPlayer[selectingKeyboardPlayerNr - 1])].Selection == 0)
                        {
                            SelectSlides[htSelectSlides(SelectSlideDuetPlayer[selectingKeyboardPlayerNr - 1])].SetSelectionByValueIndex(1);
                        }
                        else
                        {
                            SelectSlides[htSelectSlides(SelectSlideDuetPlayer[selectingKeyboardPlayerNr - 1])].SetSelectionByValueIndex(0);
                        }
                        //Reset all values
                        selectingKeyboardPlayerNr  = 0;
                        selectingKeyboardActive    = false;
                        selectingKeyboardUnendless = false;
                        NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
                        SetInteractionToButton(Buttons[htButtons(ButtonStart)]);
                    }
                    break;
                }
            }
            //Normal Keyboard handling
            else
            {
                base.HandleInput(KeyEvent);
                bool processed = false;
                switch (KeyEvent.Key)
                {
                case Keys.Escape:
                case Keys.Back:
                    CGraphics.FadeTo(EScreens.ScreenSong);
                    break;

                case Keys.Enter:

                    if (!processed && Buttons[htButtons(ButtonBack)].Selected)
                    {
                        processed = true;
                        CGraphics.FadeTo(EScreens.ScreenSong);
                    }

                    if (!processed /* && Buttons[htButtons(ButtonStart)].Selected */)
                    {
                        processed = true;
                        StartSong();
                    }

                    break;

                case Keys.D1:
                case Keys.NumPad1:
                    selectingKeyboardPlayerNr = 1;
                    break;

                case Keys.D2:
                case Keys.NumPad2:
                    selectingKeyboardPlayerNr = 2;
                    break;

                case Keys.D3:
                case Keys.NumPad3:
                    selectingKeyboardPlayerNr = 3;
                    break;

                case Keys.D4:
                case Keys.NumPad4:
                    selectingKeyboardPlayerNr = 4;
                    break;

                case Keys.D5:
                case Keys.NumPad5:
                    selectingKeyboardPlayerNr = 5;
                    break;

                case Keys.D6:
                case Keys.NumPad6:
                    selectingKeyboardPlayerNr = 6;
                    break;
                }

                if (!processed)
                {
                    UpdatePlayerNumber();
                }

                if (selectingKeyboardPlayerNr > 0 && selectingKeyboardPlayerNr <= CConfig.NumPlayer)
                {
                    selectingKeyboardActive = true;
                    NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, selectingKeyboardPlayerNr);
                }
            }

            return(true);
        }
Exemplo n.º 24
0
        public override bool HandleMouse(MouseEvent MouseEvent)
        {
            base.HandleMouse(MouseEvent);

            //Check if LeftButton is hold and Select-Mode inactive
            if (MouseEvent.LBH && !selectingMouseActive)
            {
                //Save mouse-coords
                OldMouseX = MouseEvent.X;
                OldMouseY = MouseEvent.Y;
                //Check if mouse if over tile
                if (NameSelections[htNameSelections(NameSelection)].isOverTile(MouseEvent))
                {
                    //Get player-number of tile
                    SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].TilePlayerNr(MouseEvent);
                    if (SelectedPlayerNr != -1)
                    {
                        //Activate mouse-selecting
                        selectingMouseActive = true;

                        //Update of Drag/Drop-Texture
                        CStatic SelectedPlayer = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(MouseEvent);
                        chooseAvatarStatic.Visible = true;
                        chooseAvatarStatic.Rect    = SelectedPlayer.Rect;
                        chooseAvatarStatic.Rect.Z  = CSettings.zNear;
                        chooseAvatarStatic.Color   = new SColorF(1, 1, 1, 1);
                        chooseAvatarStatic.Texture = SelectedPlayer.Texture;
                    }
                }
            }

            //Check if LeftButton is hold and Select-Mode active
            if (MouseEvent.LBH && selectingMouseActive)
            {
                //Update coords for Drag/Drop-Texture
                chooseAvatarStatic.Rect.X += (MouseEvent.X - OldMouseX);
                chooseAvatarStatic.Rect.Y += (MouseEvent.Y - OldMouseY);
                OldMouseX = MouseEvent.X;
                OldMouseY = MouseEvent.Y;
            }
            // LeftButton isn't hold anymore, but Selec-Mode is still active -> "Drop" of Avatar
            else if (selectingMouseActive)
            {
                //Check if really a player was selected
                if (SelectedPlayerNr != -1)
                {
                    //Foreach Drop-Area
                    for (int i = 0; i < StaticPlayer.Length; i++)
                    {
                        //Check first, if area is "active"
                        if (Statics[htStatics(StaticPlayer[i])].Visible == true)
                        {
                            //Check if Mouse is in area
                            if (CHelper.IsInBounds(Statics[htStatics(StaticPlayer[i])].Rect, MouseEvent))
                            {
                                //Update Game-infos with new player
                                CGame.Player[i].Name       = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
                                CGame.Player[i].Difficulty = CProfiles.Profiles[SelectedPlayerNr].Difficulty;
                                CGame.Player[i].ProfileID  = SelectedPlayerNr;
                                //Update config for default players.
                                CConfig.Players[i] = CProfiles.Profiles[SelectedPlayerNr].ProfileFile;
                                CConfig.SaveConfig();
                                //Update texture and name
                                Statics[htStatics(StaticPlayerAvatar[i])].Texture = chooseAvatarStatic.Texture;
                                Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
                                //Update profile-warning
                                CheckPlayers();
                                //Update Tiles-List
                                NameSelections[htNameSelections(NameSelection)].UpdateList();
                            }
                        }
                    }
                    SelectedPlayerNr = -1;
                }
                //Reset variables
                selectingMouseActive       = false;
                chooseAvatarStatic.Visible = false;
            }

            if (MouseEvent.LB && IsMouseOver(MouseEvent))
            {
            }

            if (MouseEvent.LB && IsMouseOver(MouseEvent))
            {
                bool processed = false;

                if (!processed && Buttons[htButtons(ButtonBack)].Selected)
                {
                    processed = true;
                    CGraphics.FadeTo(EScreens.ScreenSong);
                }

                if (!processed && Buttons[htButtons(ButtonStart)].Selected)
                {
                    processed = true;
                    StartSong();
                }

                if (!processed)
                {
                    UpdatePlayerNumber();
                }
                //Update Tiles-List
                NameSelections[htNameSelections(NameSelection)].UpdateList();
            }

            if (MouseEvent.RB)
            {
                bool exit = true;
                //Remove profile-selection
                for (int i = 0; i < CConfig.NumPlayer; i++)
                {
                    if (CHelper.IsInBounds(Statics[htStatics(StaticPlayer[i])].Rect, MouseEvent))
                    {
                        CGame.Player[i].ProfileID  = -1;
                        CGame.Player[i].Name       = String.Empty;
                        CGame.Player[i].Difficulty = EGameDifficulty.TR_CONFIG_EASY;
                        //Update config for default players.
                        CConfig.Players[i] = String.Empty;
                        CConfig.SaveConfig();
                        //Update texture and name
                        Statics[htStatics(StaticPlayerAvatar[i])].Texture = OriginalPlayerAvatarTextures[i];
                        Texts[htTexts(TextPlayer[i])].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + (i + 1).ToString();
                        //Update profile-warning
                        CheckPlayers();
                        //Update Tiles-List
                        NameSelections[htNameSelections(NameSelection)].UpdateList();
                        exit = false;
                    }
                }
                if (exit)
                {
                    CGraphics.FadeTo(EScreens.ScreenSong);
                }
            }

            //Check mouse-wheel for scrolling
            if (MouseEvent.Wheel != 0)
            {
                if (CHelper.IsInBounds(NameSelections[htNameSelections(NameSelection)].Rect, MouseEvent))
                {
                    int offset = NameSelections[htNameSelections(NameSelection)]._Offset + MouseEvent.Wheel;
                    NameSelections[htNameSelections(NameSelection)].UpdateList(offset);
                }
            }
            return(true);
        }
Exemplo n.º 25
0
        private void UpdateRatings()
        {
            CSong song = null;

            SPlayer[] player = new SPlayer[CGame.NumPlayer];
            if (_Round != 0)
            {
                song = CGame.GetSong(_Round);
                if (song == null)
                {
                    return;
                }

                Texts[htTexts(TextSong)].Text = song.Artist + " - " + song.Title;
                if (_Points.NumRounds > 1)
                {
                    Texts[htTexts(TextSong)].Text += " (" + _Round + "/" + _Points.NumRounds + ")";
                }
                player = _Points.GetPlayer(_Round - 1, CGame.NumPlayer);
            }
            else
            {
                Texts[htTexts(TextSong)].Text = "TR_SCREENSCORE_OVERALLSCORE";
                for (int i = 0; i < CGame.NumRounds; i++)
                {
                    SPlayer[] points = _Points.GetPlayer(i, CGame.NumPlayer);
                    for (int p = 0; p < player.Length; p++)
                    {
                        if (i < 1)
                        {
                            player[p].ProfileID  = points[p].ProfileID;
                            player[p].Name       = points[p].Name;
                            player[p].Difficulty = points[p].Difficulty;
                        }
                        player[p].Points += points[p].Points;
                    }
                }
                for (int p = 0; p < player.Length; p++)
                {
                    player[p].Points = (int)(player[p].Points / CGame.NumRounds);
                }
            }

            for (int p = 0; p < player.Length; p++)
            {
                if (song != null)
                {
                    if (!song.IsDuet)
                    {
                        Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name;
                    }
                    else
                    if (player[p].LineNr == 0 && song.DuetPart1 != "Part 1")
                    {
                        Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name + " (" + song.DuetPart1 + ")";
                    }
                    else if (player[p].LineNr == 1 && song.DuetPart2 != "Part 2")
                    {
                        Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name + " (" + song.DuetPart2 + ")";
                    }
                    else
                    {
                        Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name;
                    }
                }
                else
                {
                    Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name;
                }

                Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Text = ((int)Math.Round(player[p].Points)).ToString("0000") + " " + CLanguage.Translate("TR_SCREENSCORE_POINTS");
                if (CGame.NumPlayer <= 3)
                {
                    Texts[htTexts(TextRatings[p, CGame.NumPlayer - 1])].Text    = CLanguage.Translate("TR_SCREENSCORE_RATING") + ": " + CLanguage.Translate(GetRating((int)Math.Round(player[p].Points)));
                    Texts[htTexts(TextDifficulty[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate("TR_SCREENSCORE_GAMEDIFFICULTY") + ": " + CLanguage.Translate(player[p].Difficulty.ToString());
                }
                else
                {
                    Texts[htTexts(TextRatings[p, CGame.NumPlayer - 1])].Text    = CLanguage.Translate(GetRating((int)Math.Round(player[p].Points)));
                    Texts[htTexts(TextDifficulty[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate(player[p].Difficulty.ToString());
                }
                StaticPointsBarDrawnPoints[p] = 0.0;
                Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H = 0;
                Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.Y = Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H + Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.Y - Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H;
                if (player[p].ProfileID >= 0 && player[p].ProfileID < CProfiles.NumProfiles)
                {
                    Statics[htStatics(StaticAvatar[p, CGame.NumPlayer - 1])].Texture = CProfiles.Profiles[player[p].ProfileID].Avatar.Texture;
                }
            }

            if (CConfig.ScoreAnimationTime < 1)
            {
                for (int p = 0; p < CGame.NumPlayer; p++)
                {
                    Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H = ((float)player[p].Points) * (Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H / 10000);
                    Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.Y = Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H + Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.Y - Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H;
                    StaticPointsBarDrawnPoints[p] = player[p].Points;
                }
            }

            timer = new Stopwatch();
            timer.Start();
        }
Exemplo n.º 26
0
        public override void Draw()
        {
            foreach (CStatic tile in _Tiles)
            {
                if (tile.Selected && _Active)
                {
                    tile.Draw(1.2f, tile.Rect.Z - 0.1f, EAspect.Crop, false);
                }
                else
                {
                    if (tile.Texture.index != _CoverTexture.index)
                    {
                        tile.Draw(1f, tile.Rect.Z, EAspect.Crop, false);
                    }
                    else
                    {
                        tile.Draw(1f, tile.Rect.Z, EAspect.Stretch, false);
                    }
                }
            }

            if (CSongs.Category >= 0)
            {
                int actsong = _PreviewSelected;
                if ((CSongs.NumVisibleSongs > actsong) && (actsong >= 0))
                {
                    CSong song = CSongs.VisibleSongs[actsong];

                    _CoverBig.Texture       = song.CoverTextureSmall;
                    _Artist.Text            = song.Artist;
                    _Title.Text             = song.Title;
                    _DuetIcon.Visible       = song.IsDuet;
                    _VideoIcon.Visible      = song.VideoFileName.Length > 0;
                    _MedleyCalcIcon.Visible = song.Medley.Source == EMedleySource.Calculated;
                    _MedleyTagIcon.Visible  = song.Medley.Source == EMedleySource.Tag;

                    float Time = CSound.GetLength(_SongStream);
                    if (song.Finish != 0)
                    {
                        Time = song.Finish;
                    }

                    Time -= song.Start;
                    int min = (int)Math.Floor(Time / 60f);
                    int sec = (int)(Time - min * 60f);
                    _SongLength.Text = min.ToString("00") + ":" + sec.ToString("00");
                }
            }
            else
            {
                int actcat = _PreviewSelected;
                if ((CSongs.NumCategories > actcat) && (actcat >= 0))
                {
                    _CoverBig.Texture = CSongs.Categories[actcat].CoverTextureSmall;
                    _Artist.Text      = CSongs.Categories[actcat].Name;

                    int num = CSongs.NumSongsInCategory(actcat);
                    if (num != 1)
                    {
                        _Title.Text = CLanguage.Translate("TR_SCREENSONG_NUMSONGS").Replace("%v", num.ToString());
                    }
                    else
                    {
                        _Title.Text = CLanguage.Translate("TR_SCREENSONG_NUMSONG").Replace("%v", num.ToString());
                    }

                    _SongLength.Text        = String.Empty;
                    _DuetIcon.Visible       = false;
                    _VideoIcon.Visible      = false;
                    _MedleyCalcIcon.Visible = false;
                    _MedleyTagIcon.Visible  = false;
                }
            }

            _TextBG.Draw();

            _CoverBig.Draw(1f, EAspect.Crop);
            if (_vidtex.color.A < 1)
            {
                _CoverBig.Draw(1f, EAspect.Crop);
            }

            if (_vidtex.index != -1 && _Video != -1)
            {
                RectangleF bounds = new RectangleF(_CoverBig.Rect.X, _CoverBig.Rect.Y, _CoverBig.Rect.W, _CoverBig.Rect.H);
                RectangleF rect   = new RectangleF(0f, 0f, _vidtex.width, _vidtex.height);
                CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);

                CDraw.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
                                  _vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), false);
                CDraw.DrawTextureReflection(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
                                            _vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
            }



            _Artist.Draw();
            _Title.Draw();
            _SongLength.Draw();
            _DuetIcon.Draw();
            _VideoIcon.Draw();
            _MedleyCalcIcon.Draw();
            _MedleyTagIcon.Draw();
        }
Exemplo n.º 27
0
        private static void DrawDebugInfos()
        {
            string txt = String.Empty;

            CFonts.Style = EStyle.Normal;
            CFonts.SetFont("Normal");
            SColorF Gray = new SColorF(1f, 1f, 1f, 0.5f);

            float dy = 0;

            if (CConfig.DebugLevel >= EDebugLevel.TR_CONFIG_ONLY_FPS)
            {
                txt           = CTime.GetFPS().ToString("FPS: 000");
                CFonts.Height = 30f;
                RectangleF rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;
            }

            if (CConfig.DebugLevel >= EDebugLevel.TR_CONFIG_LEVEL1)
            {
                txt = CSound.GetStreamCount().ToString(CLanguage.Translate("TR_DEBUG_AUDIO_STREAMS") + ": 00");

                RectangleF rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;
            }

            if (CConfig.DebugLevel >= EDebugLevel.TR_CONFIG_LEVEL1)
            {
                txt = CVideo.GetNumStreams().ToString(CLanguage.Translate("TR_DEBUG_VIDEO_STREAMS") + ": 00");

                RectangleF rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;
            }

            if (CConfig.DebugLevel >= EDebugLevel.TR_CONFIG_LEVEL1)
            {
                txt = CDraw.TextureCount().ToString(CLanguage.Translate("TR_DEBUG_TEXTURES") + ": 00000");

                RectangleF rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;
            }

            if (CConfig.DebugLevel >= EDebugLevel.TR_CONFIG_LEVEL2)
            {
                txt = CSound.RecordGetToneAbs(0).ToString(CLanguage.Translate("TR_DEBUG_TONE_ABS") + " P1: 00");

                RectangleF rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;


                txt = CSound.RecordGetMaxVolume(0).ToString(CLanguage.Translate("TR_DEBUG_MAX_VOLUME") + " P1: 0.000");

                rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;

                txt = CSound.RecordGetToneAbs(1).ToString(CLanguage.Translate("TR_DEBUG_TONE_ABS") + " P2: 00");

                rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;


                txt = CSound.RecordGetMaxVolume(1).ToString(CLanguage.Translate("TR_DEBUG_MAX_VOLUME") + " P2: 0.000");

                rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;
            }

            if (CConfig.DebugLevel >= EDebugLevel.TR_CONFIG_LEVEL3)
            {
                txt = CSongs.NumSongsWithCoverLoaded.ToString(CLanguage.Translate("TR_DEBUG_SONGS") + ": 00000");

                RectangleF rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;
            }

            if (CConfig.DebugLevel >= EDebugLevel.TR_CONFIG_LEVEL_MAX)
            {
                txt = _Cursor.X.ToString(CLanguage.Translate("TR_DEBUG_MOUSE") + " : (0000/") + _Cursor.Y.ToString("0000)");

                RectangleF rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));

                CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
                CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
                dy += rect.Height;
            }
        }
Exemplo n.º 28
0
        private void _UpdateRatings()
        {
            CSong song    = null;
            var   players = new SPlayer[CGame.NumPlayers];

            if (_Round >= 0)
            {
                song = CGame.GetSong(_Round);
                if (song == null)
                {
                    return;
                }

                _Texts[_TextSong].Text = song.Artist + " - " + song.Title;
                if (_Points.NumRounds > 1)
                {
                    _Texts[_TextSong].Text += " (" + (_Round + 1) + "/" + _Points.NumRounds + ")";
                }
                players = _Points.GetPlayer(_Round, CGame.NumPlayers);
            }
            else
            {
                _Texts[_TextSong].Text = "TR_SCREENSCORE_OVERALLSCORE";
                for (int i = 0; i < CGame.NumRounds; i++)
                {
                    SPlayer[] points = _Points.GetPlayer(i, CGame.NumPlayers);
                    for (int p = 0; p < players.Length; p++)
                    {
                        if (i < 1)
                        {
                            players[p].ProfileID = points[p].ProfileID;
                        }
                        players[p].Points += points[p].Points;
                    }
                }
                for (int p = 0; p < players.Length; p++)
                {
                    players[p].Points = (int)Math.Round(players[p].Points / CGame.NumRounds);
                }
            }

            for (int p = 0; p < players.Length; p++)
            {
                string name = CProfiles.GetPlayerName(players[p].ProfileID, p);
                if (song != null && song.IsDuet)
                {
                    if (song.Notes.VoiceNames.IsSet(players[p].VoiceNr))
                    {
                        name += " (" + song.Notes.VoiceNames[players[p].VoiceNr] + ")";
                    }
                }
                _Texts[_TextNames[p, CGame.NumPlayers - 1]].Text = name;

                if (CGame.NumPlayers < (int)_ScreenSettings[_ScreenSettingShortScore].GetValue())
                {
                    _Texts[_TextScores[p, CGame.NumPlayers - 1]].Text = ((int)Math.Round(players[p].Points)).ToString("0000") + " " + CLanguage.Translate("TR_SCREENSCORE_POINTS");
                }
                else
                {
                    _Texts[_TextScores[p, CGame.NumPlayers - 1]].Text = ((int)Math.Round(players[p].Points)).ToString("0000");
                }
                if (CGame.NumPlayers < (int)_ScreenSettings[_ScreenSettingShortDifficulty].GetValue())
                {
                    _Texts[_TextDifficulty[p, CGame.NumPlayers - 1]].Text = CLanguage.Translate("TR_SCREENSCORE_GAMEDIFFICULTY") + ": " +
                                                                            CLanguage.Translate(CProfiles.GetDifficulty(players[p].ProfileID).ToString());
                }
                else
                {
                    _Texts[_TextDifficulty[p, CGame.NumPlayers - 1]].Text = CLanguage.Translate(CProfiles.GetDifficulty(players[p].ProfileID).ToString());
                }
                if (CGame.NumPlayers < (int)_ScreenSettings[_ScreenSettingShortRating].GetValue())
                {
                    _Texts[_TextRatings[p, CGame.NumPlayers - 1]].Text = CLanguage.Translate("TR_SCREENSCORE_RATING") + ": " +
                                                                         CLanguage.Translate(_GetRating((int)Math.Round(players[p].Points)));
                }
                else
                {
                    _Texts[_TextRatings[p, CGame.NumPlayers - 1]].Text = CLanguage.Translate(_GetRating((int)Math.Round(players[p].Points)));
                }

                _ProgressBars[_ProgressBarPoints[p, CGame.NumPlayers - 1]].Progress = (float)players[p].Points / CSettings.MaxScore;

                if (CProfiles.IsProfileIDValid(players[p].ProfileID))
                {
                    _Statics[_StaticAvatar[p, CGame.NumPlayers - 1]].Texture = CProfiles.GetAvatarTextureFromProfile(players[p].ProfileID);
                }
            }
        }
Exemplo n.º 29
0
        private void _UpdateRatings()
        {
            CSong song    = null;
            var   players = new SPlayer[CGame.NumPlayers];

            if (_Round >= 0)
            {
                song = CGame.GetSong(_Round);
                if (song == null)
                {
                    return;
                }

                _Texts[_TextSong].Text = song.Artist + " - " + song.Title;
                if (_Points.NumRounds > 1)
                {
                    _Texts[_TextSong].Text += " (" + (_Round + 1) + "/" + _Points.NumRounds + ")";
                }
                players = _Points.GetPlayer(_Round, CGame.NumPlayers);
            }
            else
            {
                _Texts[_TextSong].Text = "TR_SCREENSCORE_OVERALLSCORE";
                for (int i = 0; i < CGame.NumRounds; i++)
                {
                    SPlayer[] points = _Points.GetPlayer(i, CGame.NumPlayers);
                    for (int p = 0; p < players.Length; p++)
                    {
                        if (i < 1)
                        {
                            players[p].ProfileID = points[p].ProfileID;
                        }
                        players[p].Points += points[p].Points;
                    }
                }
                for (int p = 0; p < players.Length; p++)
                {
                    players[p].Points = (int)Math.Round(players[p].Points / CGame.NumRounds);
                }
            }

            var pointAnimDirection = (string)_ScreenSettings[_ScreenSettingAnimationDirection].GetValue();

            for (int p = 0; p < players.Length; p++)
            {
                string name = CProfiles.GetPlayerName(players[p].ProfileID, p);
                if (song != null && song.IsDuet)
                {
                    if (song.Notes.VoiceNames.IsSet(players[p].VoiceNr))
                    {
                        name += " (" + song.Notes.VoiceNames[players[p].VoiceNr] + ")";
                    }
                }
                _Texts[_TextNames[p, CGame.NumPlayers - 1]].Text = name;

                if (CGame.NumPlayers < (int)_ScreenSettings[_ScreenSettingShortScore].GetValue())
                {
                    _Texts[_TextScores[p, CGame.NumPlayers - 1]].Text = ((int)Math.Round(players[p].Points)).ToString("0000") + " " + CLanguage.Translate("TR_SCREENSCORE_POINTS");
                }
                else
                {
                    _Texts[_TextScores[p, CGame.NumPlayers - 1]].Text = ((int)Math.Round(players[p].Points)).ToString("0000");
                }
                if (CGame.NumPlayers < (int)_ScreenSettings[_ScreenSettingShortDifficulty].GetValue())
                {
                    _Texts[_TextDifficulty[p, CGame.NumPlayers - 1]].Text = CLanguage.Translate("TR_SCREENSCORE_GAMEDIFFICULTY") + ": " +
                                                                            CLanguage.Translate(CProfiles.GetDifficulty(players[p].ProfileID).ToString());
                }
                else
                {
                    _Texts[_TextDifficulty[p, CGame.NumPlayers - 1]].Text = CLanguage.Translate(CProfiles.GetDifficulty(players[p].ProfileID).ToString());
                }
                if (CGame.NumPlayers < (int)_ScreenSettings[_ScreenSettingShortRating].GetValue())
                {
                    _Texts[_TextRatings[p, CGame.NumPlayers - 1]].Text = CLanguage.Translate("TR_SCREENSCORE_RATING") + ": " +
                                                                         CLanguage.Translate(_GetRating((int)Math.Round(players[p].Points)));
                }
                else
                {
                    _Texts[_TextRatings[p, CGame.NumPlayers - 1]].Text = CLanguage.Translate(_GetRating((int)Math.Round(players[p].Points)));
                }

                _StaticPointsBarDrawnPoints[p] = 0.0;
                if (pointAnimDirection.ToLower() == "vertical")
                {
                    _Statics[_StaticPointsBar[p, CGame.NumPlayers - 1]].W = 0;
                }
                else
                {
                    _Statics[_StaticPointsBar[p, CGame.NumPlayers - 1]].H = 0;
                    _Statics[_StaticPointsBar[p, CGame.NumPlayers - 1]].Y = _Statics[_StaticPointsBarBG[p, CGame.NumPlayers - 1]].H +
                                                                            _Statics[_StaticPointsBarBG[p, CGame.NumPlayers - 1]].Y -
                                                                            _Statics[_StaticPointsBar[p, CGame.NumPlayers - 1]].H;
                }
                if (CProfiles.IsProfileIDValid(players[p].ProfileID))
                {
                    _Statics[_StaticAvatar[p, CGame.NumPlayers - 1]].Texture = CProfiles.GetAvatarTextureFromProfile(players[p].ProfileID);
                }
            }

            if (CConfig.Config.Game.ScoreAnimationTime < 1)
            {
                for (int p = 0; p < CGame.NumPlayers; p++)
                {
                    if (pointAnimDirection.ToLower() == "vertical")
                    {
                        _Statics[_StaticPointsBar[p, CGame.NumPlayers - 1]].W = ((float)players[p].Points) *
                                                                                (_Statics[_StaticPointsBarBG[p, CGame.NumPlayers - 1]].W / CSettings.MaxScore);
                    }
                    else
                    {
                        _Statics[_StaticPointsBar[p, CGame.NumPlayers - 1]].H = ((float)players[p].Points) *
                                                                                (_Statics[_StaticPointsBarBG[p, CGame.NumPlayers - 1]].H / CSettings.MaxScore);
                        _Statics[_StaticPointsBar[p, CGame.NumPlayers - 1]].Y = _Statics[_StaticPointsBarBG[p, CGame.NumPlayers - 1]].H +
                                                                                _Statics[_StaticPointsBarBG[p, CGame.NumPlayers - 1]].Y -
                                                                                _Statics[_StaticPointsBar[p, CGame.NumPlayers - 1]].H;
                    }
                    _StaticPointsBarDrawnPoints[p] = players[p].Points;
                }
            }

            _Timer = new Stopwatch();
            _Timer.Start();
        }