mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复了拖拽问题,并避免在拖拽时触发摸头
修复了拖拽问题,并避免在拖拽时触发摸头
This commit is contained in:
commit
089b1324a7
@ -157,10 +157,12 @@ namespace VPet_Simulator.Core
|
||||
SmartMoveTimer.Start();
|
||||
}
|
||||
}
|
||||
((UIElement)e.Source).ReleaseMouseCapture();
|
||||
}
|
||||
|
||||
private void MainGrid_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
((UIElement)e.Source).CaptureMouse();
|
||||
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;
|
||||
@ -203,6 +205,9 @@ namespace VPet_Simulator.Core
|
||||
private DateTime wavespan;
|
||||
private void MainGrid_MouseWave(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (rasetype >= 0)
|
||||
return;
|
||||
|
||||
if ((DateTime.Now - wavespan).TotalSeconds > 2)
|
||||
{
|
||||
wavetimes = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user