fix the configuration QuicklySkipConversationsEnabled not work

This commit is contained in:
huiyadanli 2023-10-15 18:47:54 +08:00
parent 967f5ca1a7
commit 50cf9aa8b2
2 changed files with 15 additions and 16 deletions

View File

@ -12,9 +12,9 @@ namespace BetterGenshinImpact.Core.Config;
[Serializable]
public partial class HotKeyConfig : ObservableObject
{
[ObservableProperty] private string _autoPickEnabledHotkey = "";
[ObservableProperty] private string _autoPickEnabledHotkey = "F1";
[ObservableProperty] private string _autoSkipEnabledHotkey = "Alt + F2";
[ObservableProperty] private string _autoSkipEnabledHotkey = "F2";
[ObservableProperty] private string _autoFishingEnabledHotkey = "";

View File

@ -54,21 +54,20 @@ public class AutoSkipTrigger : ITaskTrigger
if (TaskContext.Instance().Config.AutoSkipConfig.QuicklySkipConversationsEnabled)
{
Simulation.SendInput.Keyboard.KeyPress(VirtualKeyCode.SPACE);
// 找右下的对话选项按钮
content.CaptureRectArea.Find(_autoSkipAssets.OptionButtonRo, (optionButtonRectArea) =>
{
optionButtonRectArea.ClickCenter();
if (Math.Abs(content.FrameIndex - _prevClickFrameIndex) >= 8)
{
_logger.LogInformation("自动剧情:{Text}", "点击选项");
}
_prevClickFrameIndex = content.FrameIndex;
optionButtonRectArea.Dispose();
});
}
// 找右下的对话选项按钮
content.CaptureRectArea.Find(_autoSkipAssets.OptionButtonRo, (optionButtonRectArea) =>
{
optionButtonRectArea.ClickCenter();
if (Math.Abs(content.FrameIndex - _prevClickFrameIndex) >= 8)
{
_logger.LogInformation("自动剧情:{Text}", "点击选项");
}
_prevClickFrameIndex = content.FrameIndex;
optionButtonRectArea.Dispose();
});
}
else
{