修复拖动卡主的错误情况

This commit is contained in:
ZouJin 2023-08-15 05:07:02 +10:00
parent 74ab826e84
commit 24c07f7018

View File

@ -294,7 +294,14 @@ namespace VPet_Simulator.Core
private void MainGrid_MouseMove(object sender, MouseEventArgs e)
{
((UIElement)e.Source).CaptureMouse();
if (!((UIElement)e.Source).CaptureMouse() || !isPress)
{
MainGrid.MouseMove -= MainGrid_MouseMove;
MainGrid.MouseMove += MainGrid_MouseWave;
rasetype = -1;
DisplayRaising();
return;
}
var mp = e.GetPosition(MainGrid);
var x = mp.X - Core.Graph.GraphConfig.RaisePoint[(int)Core.Save.Mode].X;
var y = mp.Y - Core.Graph.GraphConfig.RaisePoint[(int)Core.Save.Mode].Y;