public static void SetVerticalAlignment(this RectTransform rectTransform, VerticalAlignment alignment) { GRange anchorRange = GetAnchorRange(alignment); rectTransform.anchorMin = new Vector2(rectTransform.anchorMin.x, anchorRange.min); rectTransform.anchorMax = new Vector2(rectTransform.anchorMax.x, anchorRange.max); }
public static void SetHorizontalAlignment(this RectTransform rectTransform, HorizontalAlignment alignment) { GRange anchorRange = GetAnchorRange(alignment); rectTransform.anchorMin = new Vector2(anchorRange.min, rectTransform.anchorMin.y); rectTransform.anchorMax = new Vector2(anchorRange.max, rectTransform.anchorMax.y); }
public static UpdateBordersRequest GetInnerCols(GRange range, GBorderLineType lineType) { return(new UpdateBordersRequest() { InnerHorizontal = BorderDictionary[lineType], Range = range.GetGridRange() }); }
public static UpdateBordersRequest GetOuterBorders(GRange range, GBorderLineType lineType) { return(new UpdateBordersRequest() { Bottom = BorderDictionary[lineType], Left = BorderDictionary[lineType], Right = BorderDictionary[lineType], Top = BorderDictionary[lineType], Range = range.GetGridRange() }); }
public static Request GenerateRequest(GMergeType type, GRange range) { return(new Request() { MergeCells = new MergeCellsRequest() { MergeType = GetMergeType(type), Range = range.GetGridRange() } }); }
public static Request GenerateRepeatCellRequest(GRange range, GCell cell) { return(new Request() { RepeatCell = new RepeatCellRequest() { Cell = cell.GetCellData(), Fields = cell.GetFields(), Range = range.GetGridRange() } }); }
public static Request GenerateRequest(GUpdateBordersType type, GBorderLineType lineType, GRange range) { UpdateBordersRequest request; switch (type) { case GUpdateBordersType.InnerRows: request = GetInnerRows(range, lineType); break; case GUpdateBordersType.InnerColumns: request = GetInnerCols(range, lineType); break; case GUpdateBordersType.Outer: default: request = GetOuterBorders(range, lineType); break; } return(new Request() { UpdateBorders = request }); }