nit
This commit is contained in:
@@ -73,15 +73,14 @@ namespace UIFixes
|
||||
Dictionary<StashGridClass, Vector2Int> gridOffsets = [];
|
||||
Dictionary<int, Dictionary<int, StashGridClass>> gridsByLocation = [];
|
||||
|
||||
// Sometimes the parent's pivot is 0, 1; sometimes it's 0,0. Thanks BSG
|
||||
// Sometimes the parent's pivot is 0,1; sometimes it's 0,0. Thanks BSG
|
||||
RectTransform parentView = initialGridView.transform.parent.RectTransform();
|
||||
Vector2 parentPosition = parentView.pivot.y == 1 ? parentView.position : new Vector2(parentView.position.x, parentView.position.y + parentView.sizeDelta.y);
|
||||
|
||||
GridView[] gridViews = parentView.GetComponentsInChildren<GridView>();
|
||||
|
||||
Vector2 gridSize = new(64f * parentView.lossyScale.x, 64f * parentView.lossyScale.y);
|
||||
|
||||
foreach (GridView gridView in gridViews)
|
||||
foreach (GridView gridView in parentView.GetComponentsInChildren<GridView>())
|
||||
{
|
||||
// Get absolute offsets
|
||||
float xOffset = gridView.transform.position.x - parentPosition.x;
|
||||
|
Reference in New Issue
Block a user