From cb66c02c611719facc998eac1cafc371019f0782 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Wed, 9 Aug 2023 00:09:49 +1000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DMOD=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E5=92=8C=E9=95=BF=E6=8C=89=E9=80=BB=E8=BE=91=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Display/Main.xaml.cs | 21 +++++++++++++------ VPet-Simulator.Windows/Function/CoreMOD.cs | 5 +++++ VPet-Simulator.Windows/WinDesign/TalkBox.xaml | 2 +- .../WinDesign/winGameSetting.xaml.cs | 4 ++-- .../mod/0000_core/lang/en/CGPT2308.lps | 4 ++-- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/VPet-Simulator.Core/Display/Main.xaml.cs b/VPet-Simulator.Core/Display/Main.xaml.cs index 7f6e71c..5922333 100644 --- a/VPet-Simulator.Core/Display/Main.xaml.cs +++ b/VPet-Simulator.Core/Display/Main.xaml.cs @@ -213,19 +213,20 @@ namespace VPet_Simulator.Core //} MoveTimer.Start(); } + /// + /// 默认点击事件 + /// public Action DefaultClickAction; + /// + /// 默认长按事件 + /// + public Action DefaultPressAction; bool isPress = false; long presstime; private void MainGrid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { isPress = true; CountNomal = 0; - if (DisplayType.Type != GraphType.Default) - {//不是nomal! 可能会卡timer,所有全部timer清空下 - CleanState(); - if (DisplayStop(DisplayToNomal)) - return; - } Task.Run(() => { var pth = DateTime.Now.Ticks; @@ -242,6 +243,7 @@ namespace VPet_Simulator.Core if (x.IsPress == true && x.Touch(mp) && x.DoAction()) return; } + DefaultPressAction?.Invoke(); } else {//历遍点击事件 @@ -251,6 +253,13 @@ namespace VPet_Simulator.Core if (x.IsPress == false && x.Touch(mp) && x.DoAction()) return; } + //普通点击验证 + if (DisplayType.Type != GraphType.Default) + {//不是nomal! 可能会卡timer,所有全部timer清空下 + CleanState(); + if (DisplayStop(DisplayToNomal)) + return; + } DefaultClickAction?.Invoke(); } }); diff --git a/VPet-Simulator.Windows/Function/CoreMOD.cs b/VPet-Simulator.Windows/Function/CoreMOD.cs index d42e3d1..3b2f3a0 100644 --- a/VPet-Simulator.Windows/Function/CoreMOD.cs +++ b/VPet-Simulator.Windows/Function/CoreMOD.cs @@ -162,6 +162,10 @@ namespace VPet_Simulator.Windows break; case "lang": Tag.Add("lang"); + foreach (FileInfo fi in di.EnumerateFiles("*.lps")) + { + LocalizeCore.AddCulture(fi.Name.Substring(0, fi.Name.Length - fi.Extension.Length), new LPS_D(File.ReadAllText(fi.FullName))); + } foreach (DirectoryInfo dis in di.EnumerateDirectories()) { foreach (FileInfo fi in dis.EnumerateFiles("*.lps")) @@ -213,6 +217,7 @@ namespace VPet_Simulator.Windows { if (!IsPassMOD(mw)) {//不是通过模组,不加载 + SuccessLoad = false; continue; } } diff --git a/VPet-Simulator.Windows/WinDesign/TalkBox.xaml b/VPet-Simulator.Windows/WinDesign/TalkBox.xaml index d42253a..c979182 100644 --- a/VPet-Simulator.Windows/WinDesign/TalkBox.xaml +++ b/VPet-Simulator.Windows/WinDesign/TalkBox.xaml @@ -20,7 +20,7 @@ -