diff --git a/Qwilight/Assets/Language.json b/Qwilight/Assets/Language.json index 5e8302b..c9b93fd 100644 --- a/Qwilight/Assets/Language.json +++ b/Qwilight/Assets/Language.json @@ -2783,6 +2783,10 @@ "ko-KR": "미리듣기를 일시 정지합니다.", "en-US": "Pause the preview" }, + "PausedText": { + "ko-KR": "일시 정지가 결과에 기록됩니다.", + "en-US": "The pause is recorded in the result." + }, "PlatformAutoComputing": { "ko-KR": "오토 플레이 중…", "en-US": "AutoPlaying…" diff --git a/Qwilight/Compute/DefaultCompute.cs b/Qwilight/Compute/DefaultCompute.cs index dd1fea8..29cbebd 100644 --- a/Qwilight/Compute/DefaultCompute.cs +++ b/Qwilight/Compute/DefaultCompute.cs @@ -163,7 +163,6 @@ bool _paintEnlargedLastBand; double _millisMeter; double _millisStandardMeter; - bool _isPaused; InputFlag _inputFlags; int _totalComments; bool _isVeilDrawingCollapsed; @@ -550,6 +549,11 @@ } } + /// + /// 게임 중 일시 정지 여부 + /// + public bool IsPaused { get; set; } + public bool IsSilent { get; set; } public int NoteFrame { get; set; } @@ -1511,7 +1515,7 @@ LateValue = lastComputer.LateValue; HasFailedJudgment = lastComputer.HasFailedJudgment; IsF.SetValue(lastComputer.IsF); - _isPaused = lastComputer._isPaused; + IsPaused = lastComputer.IsPaused; _inputFlags = lastComputer._inputFlags; Array.Copy(lastComputer._hitPointsGAS, _hitPointsGAS, _hitPointsGAS.Length); }); @@ -2236,7 +2240,7 @@ { if (CanPause && !CanSetPosition && ValidatedTotalNotes > 0 && LastStatusValue == LastStatus.Not && _validJudgedNotes > 0) { - _isPaused = true; + IsPaused = true; if (!SetPause) { if (_pauseMillis == 0.0) @@ -4362,7 +4366,7 @@ { try { - DB.Instance.SaveComment(date, NoteFile, string.Empty, commentID, AvatarName, TotallyLevyingMultiplier, TotallyLevyingAudioMultiplier, ModeComponentValue, Stand.TargetValue, HighestBand, IsBand1, Point.TargetValue, _isPaused, _inputFlags); + DB.Instance.SaveComment(date, NoteFile, string.Empty, commentID, AvatarName, TotallyLevyingMultiplier, TotallyLevyingAudioMultiplier, ModeComponentValue, Stand.TargetValue, HighestBand, IsBand1, Point.TargetValue, IsPaused, _inputFlags); using var fs = File.OpenWrite(Path.Combine(QwilightComponent.CommentEntryPath, commentID)); _comments.Single().WriteTo(fs); } @@ -4393,7 +4397,7 @@ band = HighestBand, point = Point.TargetValue, salt = ModeComponentValue.Salt, - isPaused = _isPaused, + isPaused = IsPaused, inputFlags = _inputFlags }, UnsafeByteOperations.UnsafeWrap(NoteFileContents), Comment.ToByteString()); } @@ -4412,7 +4416,7 @@ { try { - DB.Instance.SaveComment(date, default, eventNoteID, commentID, AvatarName, TotallyLevyingMultiplier, TotallyLevyingAudioMultiplier, ModeComponentValue, Stand.TargetValue, HighestBand, IsBand1, Point.TargetValue, _isPaused, _inputFlags); + DB.Instance.SaveComment(date, default, eventNoteID, commentID, AvatarName, TotallyLevyingMultiplier, TotallyLevyingAudioMultiplier, ModeComponentValue, Stand.TargetValue, HighestBand, IsBand1, Point.TargetValue, IsPaused, _inputFlags); using (var zipFile = new ZipFile(Path.Combine(QwilightComponent.CommentEntryPath, Path.ChangeExtension(commentID, ".zip")))) { for (var i = _comments.Count - 1; i >= 0; --i) @@ -4542,7 +4546,7 @@ _millisMeter = 0.0; IsMediaHandling = false; HasFailedJudgment = false; - _isPaused = false; + IsPaused = false; _inputFlags = InputFlag.Not; _isVeilDrawingCollapsed = false; AudioSystem.Instance.Stop(this); diff --git a/Qwilight/System/DrawingSystem/DrawingSystem.cs b/Qwilight/System/DrawingSystem/DrawingSystem.cs index 1d42462..c3879ef 100644 --- a/Qwilight/System/DrawingSystem/DrawingSystem.cs +++ b/Qwilight/System/DrawingSystem/DrawingSystem.cs @@ -2288,6 +2288,11 @@ pauseNotify0Position1 += PaintNotify0Contents(mediaModifierContents, pauseNotify0Position0, pauseNotify0Position1, PauseNotifyFont, Colors.White) + Levels.StandardMarginFloat32; } + if (defaultComputer.IsPaused) + { + pauseNotify1Position1 += PaintNotify1Contents(LanguageSystem.Instance.PausedText, pauseNotify1Position0, pauseNotify1Position1, PauseNotifyFont, Colors.Yellow) + Levels.StandardMarginFloat32; + } + var wwwLevelData = defaultComputer.WwwLevelDataValue; if (wwwLevelData != null) { diff --git a/Qwilight/System/LanguageSystem/LanguageSystem.g.cs b/Qwilight/System/LanguageSystem/LanguageSystem.g.cs index faf3cd2..bb8bb43 100644 --- a/Qwilight/System/LanguageSystem/LanguageSystem.g.cs +++ b/Qwilight/System/LanguageSystem/LanguageSystem.g.cs @@ -698,6 +698,7 @@ public string PassNotify { get; set; } public string PassNotifyText { get; set; } public string PauseAssist { get; set; } + public string PausedText { get; set; } public string PlatformAutoComputing { get; set; } public string PlatformCommentComputing { get; set; } public string PlatformDefaultComputing { get; set; } diff --git a/Qwilight/ViewModel/ModifyModeComponentViewModel.cs b/Qwilight/ViewModel/ModifyModeComponentViewModel.cs index e2a2649..dbcd950 100644 --- a/Qwilight/ViewModel/ModifyModeComponentViewModel.cs +++ b/Qwilight/ViewModel/ModifyModeComponentViewModel.cs @@ -52,6 +52,24 @@ OnPropertyChanged(nameof(IsHitPointsMode)); ModeComponentItems = ModifyModeComponentItems[value]; } + var targetModeValue = value switch + { + AutoModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.AutoModeValue, + NoteSaltModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.NoteSaltModeValue, + FaintNoteModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.FaintNoteModeValue, + JudgmentModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.JudgmentModeValue, + HitPointsModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.HitPointsModeValue, + NoteMobilityModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.NoteMobilityModeValue, + LongNoteModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.LongNoteModeValue, + InputFavorModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.InputFavorModeValue, + NoteModifyModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.NoteModifyModeValue, + BPMModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.BPMModeValue, + WaveModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.WaveModeValue, + SetNoteModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.SetNoteModeValue, + LowestJudgmentConditionModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.LowestJudgmentConditionModeValue, + _ => throw new ArgumentException(value.ToString()) + }; + ModeComponentItem = ModeComponentItems.Single(modeComponentItem => modeComponentItem.Value == targetModeValue); } } @@ -830,29 +848,6 @@ }); } - public override void OnOpened() - { - base.OnOpened(); - var targetModeValue = ModeComponentVariety switch - { - AutoModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.AutoModeValue, - NoteSaltModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.NoteSaltModeValue, - FaintNoteModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.FaintNoteModeValue, - JudgmentModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.JudgmentModeValue, - HitPointsModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.HitPointsModeValue, - NoteMobilityModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.NoteMobilityModeValue, - LongNoteModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.LongNoteModeValue, - InputFavorModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.InputFavorModeValue, - NoteModifyModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.NoteModifyModeValue, - BPMModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.BPMModeValue, - WaveModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.WaveModeValue, - SetNoteModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.SetNoteModeValue, - LowestJudgmentConditionModeVariety => (int)ViewModels.Instance.MainValue.ModeComponentValue.LowestJudgmentConditionModeValue, - _ => throw new ArgumentException(ModeComponentVariety.ToString()) - }; - ModeComponentItem = ModeComponentItems.Single(modeComponentItem => modeComponentItem.Value == targetModeValue); - } - public override void OnCollapsed() { base.OnCollapsed();