mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
feat: 可以点 20 次按钮关闭弹窗
This commit is contained in:
@@ -94,6 +94,7 @@ public static class AchievementIds
|
||||
public const string QuickCloser = "QuickCloser";
|
||||
public const string TacticalRetreat = "TacticalRetreat";
|
||||
public const string Martian = "Martian";
|
||||
public const string AnnouncementStubbornClick = "AnnouncementStubbornClick";
|
||||
|
||||
public const string RecruitGroup = "Recruit";
|
||||
public const string RecruitNoSixStar = "RecruitNoSixStar";
|
||||
|
||||
@@ -174,7 +174,7 @@ public class AchievementTrackerHelper : PropertyChangedBase
|
||||
return new([.. id.TakeWhile(char.IsLetter)]);
|
||||
}
|
||||
|
||||
public void Unlock(string id, bool staysOpen = true)
|
||||
public void Unlock(string id, bool staysOpen = true, bool forceStayOpen = false)
|
||||
{
|
||||
if (!_achievements.TryGetValue(id, out var achievement) || achievement.IsUnlocked)
|
||||
{
|
||||
@@ -190,7 +190,7 @@ public class AchievementTrackerHelper : PropertyChangedBase
|
||||
{
|
||||
IsCustom = true,
|
||||
Message = $"{LocalizationHelper.GetString("AchievementCelebrate")}: {achievement.Title}\n{achievement.Description}",
|
||||
StaysOpen = staysOpen && !SettingsViewModel.AchievementSettings.AchievementPopupAutoClose,
|
||||
StaysOpen = forceStayOpen || (staysOpen && !SettingsViewModel.AchievementSettings.AchievementPopupAutoClose),
|
||||
WaitTime = 15,
|
||||
IconKey = "HangoverGeometry",
|
||||
IconBrushKey = achievement.MedalBrushKey,
|
||||
@@ -466,6 +466,7 @@ public class AchievementTrackerHelper : PropertyChangedBase
|
||||
Humor(id: AchievementIds.QuickCloser, isHidden: true), // 快速关闭弹窗
|
||||
Humor(id: AchievementIds.TacticalRetreat), // 停止任务
|
||||
Humor(id: AchievementIds.Martian, isHidden: true), // 90 天没更新
|
||||
Humor(id: AchievementIds.AnnouncementStubbornClick, isHidden: true), // 不看公告
|
||||
|
||||
Humor(id: AchievementIds.RecruitNoSixStar, group: AchievementIds.RecruitGroup, target: 500), // 公招中累计 500 次没出现六星tag
|
||||
Humor(id: AchievementIds.RecruitNoSixStarStreak, group: AchievementIds.RecruitGroup, target: 500, isHidden: true), // 公招中连续 500 次没出现六星tag
|
||||
|
||||
@@ -1370,6 +1370,10 @@ If you want to run multiple MAA at the same time, please copy the whole MAA and
|
||||
<system:String x:Key="Achievement.Martian.Conditions">Resource or version date is more than 3 months old</system:String>
|
||||
<system:String x:Key="Achievement.Martian.ConditionsTip">Resource or version date is more than {0} months old</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Title">Stubborn</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Description">Even after being prompted so many times, you still choose not to read the announcement.</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Conditions">Click the close button more than 20 times without scrolling to the bottom</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.Rules.Title">Serious Erro-</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Description">I'll be watching you.</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Conditions">MAA Employee Guidelines</system:String>
|
||||
|
||||
@@ -1371,6 +1371,10 @@ MAA を複数開くには、新しい MAA を他のフォルダにコピーし
|
||||
<system:String x:Key="Achievement.Martian.Conditions">リソースまたはバージョンの時間が3ヶ月以上経過している</system:String>
|
||||
<system:String x:Key="Achievement.Martian.ConditionsTip">リソースまたはバージョンの時間が{0}ヶ月以上経過している</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Title">頑固者</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Description">何度も通知されているのに、それでもお知らせを読まずに閉じ続ける。</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Conditions">下までスクロールせずに閉じるボタンを20回以上クリックする</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.Rules.Title">重大エラー</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Description">私はずっとあなたを見つめています。</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Conditions">MAAのスタッフ規則</system:String>
|
||||
|
||||
@@ -1372,6 +1372,10 @@ MAA를 독립된 새 폴더에 압축 해제하거나, MAA에 속하지 않는 D
|
||||
<system:String x:Key="Achievement.Martian.Conditions">리소스 또는 버전이 현재로부터 3개월 초과</system:String>
|
||||
<system:String x:Key="Achievement.Martian.ConditionsTip">리소스 또는 버전이 현재로부터 {0}개월 초과</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Title">고집불통</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Description">수차례 안내를 받았음에도 불구하고 공지를 보지 않고 닫기를 선택했습니다.</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Conditions">맨 아래로 스크롤하지 않은 상태에서 닫기 버튼을 20회 이상 클릭함</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.Rules.Title">서약 완료</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Description">약속한 거예요? 제가 옆에서 지켜볼게요</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Conditions">MAA 이용 약관</system:String>
|
||||
|
||||
@@ -1371,6 +1371,10 @@ C:\\leidian\\LDPlayer9。\n
|
||||
<system:String x:Key="Achievement.Martian.Conditions">资源时间或版本时间距今超过 3 个月</system:String>
|
||||
<system:String x:Key="Achievement.Martian.ConditionsTip">资源时间或版本时间距今超过 {0} 个月</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Title">死不悔改</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Description">即使提示了这么多次,你依然选择不看公告。</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Conditions">在未滚动到底部的情况下点击关闭按钮超过 20 次</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.Rules.Title">严重错讠</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Description">我会一直注视着你。</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Conditions">MAA 员工守则</system:String>
|
||||
|
||||
@@ -1371,6 +1371,10 @@ C:\\leidian\\LDPlayer9。\n
|
||||
<system:String x:Key="Achievement.Martian.Conditions">資源時間或版本時間距今超過 3 個月</system:String>
|
||||
<system:String x:Key="Achievement.Martian.ConditionsTip">資源時間或版本時間距今超過 {0} 個月</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Title">死不悔改</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Description">即使提示了這麼多次,你依然選擇不看公告。</system:String>
|
||||
<system:String x:Key="Achievement.AnnouncementStubbornClick.Conditions">在未滾動到底部的情況下點擊關閉按鈕超過 20 次</system:String>
|
||||
|
||||
<system:String x:Key="Achievement.Rules.Title">嚴重錯訁</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Description">我會一直注視著你。</system:String>
|
||||
<system:String x:Key="Achievement.Rules.Conditions">MAA 員工守則</system:String>
|
||||
|
||||
@@ -275,7 +275,7 @@ public class AnnouncementViewModel : Screen
|
||||
ETagCache.Save();
|
||||
}
|
||||
|
||||
private int _notFinishedClickIndex = 0;
|
||||
private int _notFinishedClick = 0;
|
||||
private static readonly string[] _notFinishedMessages = [
|
||||
LocalizationHelper.GetString("AnnouncementNotFinishedConfirm"),
|
||||
LocalizationHelper.GetString("AnnouncementNotFinishedConfirm2"),
|
||||
@@ -298,13 +298,19 @@ public class AnnouncementViewModel : Screen
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_notFinishedClickIndex < _notFinishedMessages.Length)
|
||||
if (_notFinishedClick < _notFinishedMessages.Length)
|
||||
{
|
||||
ButtonContent = _notFinishedMessages[_notFinishedClickIndex++];
|
||||
ButtonContent = _notFinishedMessages[_notFinishedClick++];
|
||||
}
|
||||
else
|
||||
{
|
||||
ButtonContent += "?\u200B";
|
||||
_notFinishedClick++;
|
||||
if (_notFinishedClick > 20)
|
||||
{
|
||||
AchievementTrackerHelper.Instance.Unlock(AchievementIds.AnnouncementStubbornClick, forceStayOpen: true);
|
||||
RequestClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user