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 @@ -