mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复拖动卡主的错误情况
This commit is contained in:
parent
74ab826e84
commit
24c07f7018
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user