mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复MOD启用和长按逻辑的BUG
This commit is contained in:
parent
89c5929b29
commit
cb66c02c61
@ -213,19 +213,20 @@ namespace VPet_Simulator.Core
|
||||
//}
|
||||
MoveTimer.Start();
|
||||
}
|
||||
/// <summary>
|
||||
/// 默认点击事件
|
||||
/// </summary>
|
||||
public Action DefaultClickAction;
|
||||
/// <summary>
|
||||
/// 默认长按事件
|
||||
/// </summary>
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
<TextBox x:Name="tbTalk" Style="{DynamicResource StandardTextBoxStyle}" Height="Auto"
|
||||
pu:TextBoxHelper.Watermark="{ll:Str 和桌宠说}" FontSize="30" AcceptsReturn="True"
|
||||
TextWrapping="WrapWithOverflow" PreviewKeyDown="tbTalk_KeyDown" />
|
||||
<Button pu:ButtonHelper.CornerRadius="4" Content="发送" BorderThickness="2"
|
||||
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str '发送'}" BorderThickness="2"
|
||||
Background="{DynamicResource SecondaryLight}" Grid.Column="2"
|
||||
BorderBrush="{DynamicResource DARKPrimaryDarker}" FontSize="30" Click="SendMessage_Click"
|
||||
ToolTip="{ll:Str '按 Ctrl+Enter 发送'}" />
|
||||
|
@ -377,7 +377,7 @@ namespace VPet_Simulator.Windows
|
||||
private void ButtonEnable_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
mw.Set.OnMod(mod.Name);
|
||||
ShowMod((string)LabelModName.Content);
|
||||
ShowMod(mod.Name);
|
||||
ButtonRestart.Visibility = Visibility.Visible;
|
||||
//int seleid = ListMod.SelectedIndex();
|
||||
ShowModList();
|
||||
@ -505,7 +505,7 @@ namespace VPet_Simulator.Windows
|
||||
"启用 {0} 的代码插件?".Translate(mod.Name), MessageBoxButton.YesNo, MessageBoxIcon.Warning) == MessageBoxResult.Yes)
|
||||
{
|
||||
mw.Set.PassMod(mod.Name);
|
||||
ShowMod((string)LabelModName.Content);
|
||||
ShowMod(mod.Name);
|
||||
ButtonRestart.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ IP times Max#Your current IP address is temporarily banned. Please wait for one
|
||||
当前使用字数#Current Token used:|
|
||||
下次刷新时间#Next refresh date :|
|
||||
由桌宠开发者提供的免费API#Free API provided by developers:|
|
||||
生成最大字数#Generate maximum number of Token:|
|
||||
生成最大字数#Generate maximum Token:|
|
||||
由桌宠开发者提供的API#API provided by developers:|
|
||||
VIP用户#VIP users:|
|
||||
按量付费字数#Pay-as-you-go Token Count:|
|
||||
按量付费字数#Pay Token Count:|
|
||||
|
Loading…
Reference in New Issue
Block a user