Cleanup overlay shaders when done (#10432)
This commit is contained in:
@@ -55,7 +55,7 @@ public sealed class DirectionIcon : TextureRect
|
||||
}
|
||||
|
||||
var rotation = direction.ToWorldAngle() - relativeAngle;
|
||||
Rotation = snap ? rotation.GetDir().ToAngle() : rotation;
|
||||
Rotation = snap ? rotation.GetDir().ToAngle() : rotation;
|
||||
}
|
||||
|
||||
protected override void Draw(DrawingHandleScreen handle)
|
||||
@@ -65,6 +65,8 @@ public sealed class DirectionIcon : TextureRect
|
||||
var offset = (-_rotation.Value).RotateVec(Size * UIScale / 2) - Size * UIScale / 2;
|
||||
handle.SetTransform(Matrix3.CreateTransform(GlobalPixelPosition - offset, -_rotation.Value));
|
||||
}
|
||||
|
||||
handle.SetTransform(Matrix3.Identity);
|
||||
base.Draw(handle);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user