예제 #1
0
        void leftMenu_UpdateScoreDB(object sender, EventArgs e)
        {
            focusManager.RemoveFocus();
            SongInformation.Update();
            if (currentSelectSong != null && currentSelectSong.SongInformation == null)
            {
                FindSongData();
            }

            chatComponent.AddSystemMessage(Utility.Language["ClientDBUpdated"]);
            SendScoreList();
        }
예제 #2
0
파일: LeftMenu.cs 프로젝트: KHCmaster/PPD
 void usc_LostFocused(IFocusable sender, FocusEventArgs args)
 {
     SongInformation.Update(usc.UpdatedSongInformations);
     UpdateUpdatableCount();
 }
예제 #3
0
파일: LeftMenu.cs 프로젝트: KHCmaster/PPD
        void LeftMenu_Inputed(IFocusable sender, InputEventArgs args)
        {
            if (args.InputInfo.IsPressed(ButtonType.Circle))
            {
                switch (selection)
                {
                case SelectionMode.UpdateScore:
                    FocusManager.Focus(usc);
                    break;

                case SelectionMode.Filter:
                    FocusManager.Focus(fc);
                    break;

                case SelectionMode.ScoreManage:
                    FocusManager.Focus(sm);
                    break;

                case SelectionMode.PlayRecord:
                    FocusManager.Focus(pr);
                    break;

                case SelectionMode.Replay:
                    FocusManager.Focus(rlc);
                    break;

                case SelectionMode.ItemList:
                    FocusManager.Focus(ilc);
                    break;

                case SelectionMode.UpdateScoreDB:
                    SongInformation.Update();
                    FocusManager.RemoveFocus();
                    break;

                case SelectionMode.Mod:
                    FocusManager.Focus(mp);
                    break;

                case SelectionMode.Finish:
                    ShouldFinish = true;
                    FocusManager.RemoveFocus();
                    break;

                case SelectionMode.RandomSelect:
                    FocusManager.Focus(randomSelect);
                    break;
                }
                if (!ShouldFinish)
                {
                    sound.Play(PPDSetting.DefaultSounds[1], -1000);
                }
            }
            else if (args.InputInfo.IsPressed(ButtonType.Cross))
            {
                FocusManager.RemoveFocus();
            }
            else if (args.InputInfo.IsPressed(ButtonType.Square))
            {
                FocusManager.RemoveFocus();
            }
            else if (args.InputInfo.IsPressed(ButtonType.Up))
            {
                selection--;
                if (selection < 0)
                {
                    selection = SelectionMode.MaxCount - 1;
                }
                if (selection == SelectionMode.PlayRecord && !PlayRecordAvailable)
                {
                    selection--;
                }
                sound.Play(PPDSetting.DefaultSounds[0], -1000);
            }
            else if (args.InputInfo.IsPressed(ButtonType.Down))
            {
                selection++;
                if (selection >= SelectionMode.MaxCount)
                {
                    selection = 0;
                }
                if (selection == SelectionMode.PlayRecord && !PlayRecordAvailable)
                {
                    selection++;
                }
                sound.Play(PPDSetting.DefaultSounds[0], -1000);
            }

            float selectY = selectDiffY;

            switch (selection)
            {
            case SelectionMode.UpdateScore:
                selectY += updateScore.Position.Y;
                break;

            case SelectionMode.Filter:
                selectY += filter.Position.Y;
                break;

            case SelectionMode.ScoreManage:
                selectY += scoreManage.Position.Y;
                break;

            case SelectionMode.PlayRecord:
                selectY += playRecord.Position.Y;
                break;

            case SelectionMode.Replay:
                selectY += replay.Position.Y;
                break;

            case SelectionMode.ItemList:
                selectY += itemList.Position.Y;
                break;

            case SelectionMode.UpdateScoreDB:
                selectY += updateScoreDB.Position.Y;
                break;

            case SelectionMode.Mod:
                selectY += mod.Position.Y;
                break;

            case SelectionMode.Finish:
                selectY += finish.Position.Y;
                break;

            case SelectionMode.RandomSelect:
                selectY += randomSelect.Position.Y;
                break;
            }
            select.Position = new Vector2(select.Position.X, selectY);
        }