mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
限制启动位置的最大值和最小值
This commit is contained in:
parent
82ff631853
commit
7ba5701147
@ -370,8 +370,8 @@ namespace VPet_Simulator.Windows.Interface
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
var line = FindorAddLine("startrecordlast");
|
var line = FindorAddLine("startrecordlast");
|
||||||
line.SetDouble("x", value.X);
|
line.SetDouble("x", Math.Min(Math.Max(value.X, -65000), 65000));
|
||||||
line.SetDouble("y", value.Y);
|
line.SetDouble("y", Math.Min(Math.Max(value.Y, -65000), 65000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -389,8 +389,8 @@ namespace VPet_Simulator.Windows.Interface
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
var line = FindorAddLine("startrecord");
|
var line = FindorAddLine("startrecord");
|
||||||
line.SetDouble("x", value.X);
|
line.SetDouble("x", Math.Min(Math.Max(value.X, -65000), 65000));
|
||||||
line.SetDouble("y", value.Y);
|
line.SetDouble("y", Math.Min(Math.Max(value.Y, -65000), 65000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user