mirror of
https://github.com/babalae/better-genshin-impact
synced 2025-01-07 03:17:16 +08:00
fix key mouse
This commit is contained in:
parent
2b658afad6
commit
6432ff1aed
@ -60,7 +60,7 @@ public class KeyMouseMacroPlayer
|
||||
var timeToWait = e.Time - (Kernel32.GetTickCount() - startTime);
|
||||
if (timeToWait < 0)
|
||||
{
|
||||
TaskControl.Logger.LogWarning("无法原速重放事件{Event},落后{TimeToWait}ms", e.Type.ToString(), -timeToWait);
|
||||
TaskControl.Logger.LogDebug("无法原速重放事件{Event},落后{TimeToWait}ms", e.Type.ToString(), (-timeToWait).ToString("F0"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -35,6 +35,11 @@ public class KeyMouseRecorder
|
||||
|
||||
public string ToJsonMacro()
|
||||
{
|
||||
// MacroEvents 需要以实际时间进行排序
|
||||
MacroEvents.Sort((a, b) => a.Time.CompareTo(b.Time));
|
||||
// 删除为负数的时间
|
||||
MacroEvents.RemoveAll(m => m.Time < 0);
|
||||
|
||||
var rect = TaskContext.Instance().SystemInfo.CaptureAreaRect;
|
||||
// 合并鼠标移动事件
|
||||
var mergedMacroEvents = new List<MacroEvent>();
|
||||
@ -189,7 +194,7 @@ public class KeyMouseRecorder
|
||||
Type = MacroEventType.MouseMoveBy,
|
||||
MouseX = state.X,
|
||||
MouseY = state.Y,
|
||||
Time = time - 5,
|
||||
Time = time - 5 - StartTime,
|
||||
CameraOrientation = cao,
|
||||
});
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ public class TpTask(CancellationToken ct)
|
||||
ra1 = CaptureToRectArea();
|
||||
}
|
||||
currentZoomLevel = GetBigMapZoomLevel(ra1);
|
||||
Logger.LogInformation($"当前缩放等级为{currentZoomLevel},地图移动过程中不要操作鼠标中键。");
|
||||
Logger.LogInformation($"当前缩放等级为{currentZoomLevel:F},地图移动过程中不要操作鼠标中键。");
|
||||
|
||||
for (var i = 0; i < 3; i++)
|
||||
{
|
||||
|
@ -274,7 +274,7 @@
|
||||
</Grid>
|
||||
|
||||
|
||||
<Grid Margin="16">
|
||||
<!--<Grid Margin="16">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
@ -298,7 +298,7 @@
|
||||
Grid.Column="1"
|
||||
Margin="0,0,36,0"
|
||||
IsChecked="{Binding Config.MaskWindowConfig.UseSubform, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
</Grid>-->
|
||||
</StackPanel>
|
||||
</ui:CardExpander>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user