mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
Document CenteredGridArrange
This commit is contained in:
1 parent
1254de742a
commit
d37222010d
1 file changed
+13
-2
@@ -6,11 +6,22 @@ using UnityEngine;
|
||||
|
||||
namespace MiraAPI.Utilities.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Utility component for arranging objects in a centered layout, similar to <see cref="GridArrange"/>.
|
||||
/// </summary>
|
||||
/// <param name="ptr"></param>
|
||||
[RegisterInIl2Cpp]
|
||||
public class CenteredGridArrange(IntPtr ptr) : MonoBehaviour(ptr)
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the cell size, which is used for spacing.
|
||||
/// </summary>
|
||||
public Vector2 CellSize;
|
||||
public int MaxColumns = 3;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum amount of columns.
|
||||
/// </summary>
|
||||
public int MaxColumns = 6;
|
||||
|
||||
private List<Transform> cells;
|
||||
private static List<Transform> currentChildren = new List<Transform>();
|
||||
@@ -73,4 +84,4 @@ public class CenteredGridArrange(IntPtr ptr) : MonoBehaviour(ptr)
|
||||
cell.position = new Vector3(x, y, cell.position.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user