Class GridItemLayout
Definition
Namespace: StardewUI.Widgets
Assembly: StardewUI.dll
Describes the layout of all items in a Grid.
Inheritance
Object ⇦ GridItemLayout
Implements
IEquatable<GridItemLayout>
Members
Properties
Name | Description |
---|---|
EqualityContract |
Methods
Name | Description |
---|---|
GetItemCountAndLength(Single, Single) | Computes the length (along the grid's PrimaryOrientation axis) of a single item, and the number of items that can fit before wrapping. |
Parse(string) | Converts the string representation of an item layout to an equivalent GridItemLayout. |
Details
Properties
EqualityContract
Property Value
Methods
GetItemCountAndLength(float, float)
Computes the length (along the grid's PrimaryOrientation axis) of a single item, and the number of items that can fit before wrapping.
public virtual ValueTuple<System.Single, System.Int32> GetItemCountAndLength(float available, float spacing);
Parameters
available
Single
The length available along the same axis.
spacing
Single
Spacing between items, to adjust count-based layouts.
Returns
The length to apply to each item.
Parse(string)
Converts the string representation of an item layout to an equivalent GridItemLayout.
Parameters
value
string
String containing the item layout to convert.
Returns
The converted layout information.