refactor: Update Unity to 2022.3.62
This commit is contained in:
@@ -111,9 +111,8 @@ namespace Cryville.Crtr.Config.UI {
|
||||
}
|
||||
|
||||
float GetRatioFromPos(Vector2 pos) {
|
||||
Vector2 lp;
|
||||
RectTransform handleArea = parent.m_handleArea;
|
||||
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(handleArea, pos, cam, out lp)) {
|
||||
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(handleArea, pos, cam, out Vector2 lp)) {
|
||||
lp -= handleArea.rect.position;
|
||||
return Mathf.Clamp01(lp.x / handleArea.rect.width);
|
||||
}
|
||||
@@ -121,8 +120,7 @@ namespace Cryville.Crtr.Config.UI {
|
||||
}
|
||||
|
||||
void SetValueFromPos(Vector2 pos) {
|
||||
double min, max;
|
||||
parent.GetRange(out min, out max);
|
||||
parent.GetRange(out double min, out double max);
|
||||
double ratio = GetRatioFromPos(pos);
|
||||
double result = parent.GetValue(ratio, Time.deltaTime, min, max);
|
||||
if (result < min) result = min;
|
||||
|
Reference in New Issue
Block a user