Пример #1
0
        public override void OnShow()
        {
            base.OnShow();

            _FadeOut = false;

            _CurrentVideo        = -1;
            _CurrentVideoTexture = new STexture(-1);
            _CurrentBeat         = -100;
            _CurrentTime         = 0f;
            _FinishTime          = 0f;
            _TimeToFirstNote     = 0f;
            _TimeToFirstNoteDuet = 0f;
            _Pause = false;

            _TimeRects.Clear();

            SingNotes[htSingNotes(SingBars)].Reset();
            for (int i = 0; i < CSettings.MaxNumPlayer; i++)
            {
                NoteLines[i] = -1;
            }

            SetVisuability();
            CBackgroundMusic.Pause();
        }
Пример #2
0
        public override void OnShowFinish()
        {
            base.OnShowFinish();

            CGame.Start();
            LoadNextSong();
            CBackgroundMusic.Pause();
        }
        public override bool HandleInput(KeyEvent KeyEvent)
        {
            base.HandleInput(KeyEvent);
            if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode))
            {
            }
            else
            {
                switch (KeyEvent.Key)
                {
                case Keys.Escape:
                case Keys.Back:
                    CGraphics.HidePopup(EPopupScreens.PopupPlayerControl);
                    return(false);

                case Keys.Enter:
                    if (Buttons[htButtons(ButtonNext)].Selected)
                    {
                        CBackgroundMusic.Next();
                    }
                    if (Buttons[htButtons(ButtonPrevious)].Selected)
                    {
                        CBackgroundMusic.Previous();
                    }
                    if (Buttons[htButtons(ButtonPlay)].Selected)
                    {
                        CBackgroundMusic.Play();
                    }
                    if (Buttons[htButtons(ButtonPause)].Selected)
                    {
                        CBackgroundMusic.Pause();
                    }
                    if (Buttons[htButtons(ButtonRepeat)].Selected)
                    {
                        CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong;
                    }
                    if (Buttons[htButtons(ButtonShowVideo)].Selected)
                    {
                        VideoPreview = !VideoPreview;
                    }
                    if (Buttons[htButtons(ButtonSing)].Selected)
                    {
                        StartSong(CBackgroundMusic.SongID, CBackgroundMusic.Duet);
                    }
                    if (Buttons[htButtons(ButtonToBackgroundVideo)].Selected)
                    {
                        VideoBackground = !VideoBackground;
                    }
                    break;
                }
            }

            return(true);
        }
 public override bool HandleMouse(MouseEvent MouseEvent)
 {
     base.HandleMouse(MouseEvent);
     if (MouseEvent.LB && IsMouseOver(MouseEvent))
     {
         if (Buttons[htButtons(ButtonNext)].Selected)
         {
             CBackgroundMusic.Next();
         }
         if (Buttons[htButtons(ButtonPrevious)].Selected)
         {
             CBackgroundMusic.Previous();
         }
         if (Buttons[htButtons(ButtonPlay)].Selected)
         {
             CBackgroundMusic.Play();
         }
         if (Buttons[htButtons(ButtonPause)].Selected)
         {
             CBackgroundMusic.Pause();
         }
         if (Buttons[htButtons(ButtonRepeat)].Selected)
         {
             CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong;
         }
         if (Buttons[htButtons(ButtonShowVideo)].Selected)
         {
             VideoPreview = !VideoPreview;
         }
         if (Buttons[htButtons(ButtonSing)].Selected)
         {
             StartSong(CBackgroundMusic.SongID, CBackgroundMusic.Duet);
         }
         if (Buttons[htButtons(ButtonToBackgroundVideo)].Selected)
         {
             VideoBackground = !VideoBackground;
         }
     }
     else if (MouseEvent.LB)
     {
         //CGraphics.HidePopup(EPopupScreens.PopupPlayerControl);
         return(false);
     }
     else if (MouseEvent.RB)
     {
         //CGraphics.HidePopup(EPopupScreens.PopupPlayerControl);
         return(false);
     }
     return(true);
 }
Пример #5
0
 public override bool HandleMouse(SMouseEvent mouseEvent)
 {
     base.HandleMouse(mouseEvent);
     if (mouseEvent.LB && _IsMouseOverCurSelection(mouseEvent))
     {
         if (_Buttons[_ButtonNext].Selected)
         {
             CBackgroundMusic.Next();
         }
         if (_Buttons[_ButtonPrevious].Selected)
         {
             CBackgroundMusic.Previous();
         }
         if (_Buttons[_ButtonPlay].Selected)
         {
             CBackgroundMusic.Play();
         }
         if (_Buttons[_ButtonPause].Selected)
         {
             CBackgroundMusic.Pause();
         }
         if (_Buttons[_ButtonRepeat].Selected)
         {
             CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong;
         }
         if (_Buttons[_ButtonShowVideo].Selected)
         {
             _VideoPreview = !_VideoPreview;
         }
         if (_Buttons[_ButtonSing].Selected)
         {
             _StartSong(CBackgroundMusic.SongID);
         }
         if (_Buttons[_ButtonToBackgroundVideo].Selected)
         {
             _VideoBackground = !_VideoBackground;
         }
     }
     else if (mouseEvent.LB)
     {
         //CGraphics.HidePopup(EPopupScreens.PopupPlayerControl);
         return(false);
     }
     else if (mouseEvent.RB)
     {
         //CGraphics.HidePopup(EPopupScreens.PopupPlayerControl);
         return(false);
     }
     return(true);
 }
Пример #6
0
        public override bool UpdateGame()
        {
            SongMenus[htSongMenus(SongMenu)].Update();
            Texts[htTexts(TextCategory)].Text = CSongs.GetActualCategoryName();

            int song = SongMenus[htSongMenus(SongMenu)].GetActualSelection();

            if ((CSongs.Category >= 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF) && song >= 0 && song < CSongs.VisibleSongs.Length)
            {
                Texts[htTexts(TextSelection)].Text = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title;
                CBackgroundMusic.Pause();
            }
            else if (CSongs.Category == -1 && song >= 0 && song < CSongs.Categories.Length)
            {
                Texts[htTexts(TextSelection)].Text = CSongs.Categories[song].Name;
                CBackgroundMusic.Play();
            }
            else
            {
                Texts[htTexts(TextSelection)].Text = String.Empty;
            }

            Texts[htTexts(TextSearchBar)].Text = _SearchText;
            if (_SearchActive)
            {
                Texts[htTexts(TextSearchBar)].Text += '|';

                Texts[htTexts(TextSearchBar)].Visible       = true;
                Texts[htTexts(TextSearchBarTitle)].Visible  = true;
                Statics[htStatics(StaticSearchBar)].Visible = true;
            }
            else
            {
                Texts[htTexts(TextSearchBar)].Visible       = false;
                Texts[htTexts(TextSearchBarTitle)].Visible  = false;
                Statics[htStatics(StaticSearchBar)].Visible = false;
            }

            return(true);
        }
Пример #7
0
 public override void OnShowFinish()
 {
     base.OnShowFinish();
     CBackgroundMusic.Pause();
 }