C# Класс FullInspector.Internal.fiRectUtility

Contains common functions to help manipulate rects.
Показать файл Открыть проект

Открытые методы

Метод Описание
CenterRect ( Rect toCenter, float height, Rect &centered ) : void
IndentedRect ( Rect source ) : Rect

Indents the given rect.

Margin ( Rect container, float horizontalMargin, float verticalMargin, Rect &smaller ) : void
MoveDown ( Rect rect, float amount ) : Rect

Moves the rect down (vertically) by the given amount. Returns an updated rect.

SplitHorizontalFlexibleMiddle ( Rect rect, float leftWidth, float rightWidth, Rect &left, Rect &middle, Rect &right ) : void
SplitHorizontalMiddleExact ( Rect rect, float middleWidth, float margin, Rect &left, Rect &middle, Rect &right ) : void
SplitHorizontalPercentage ( Rect rect, float percentage, float margin, Rect &left, Rect &right ) : void

Splits a rect into two, with the split occurring at a certain percentage of the rect's width.

SplitLeftHorizontalExact ( Rect rect, float leftWidth, float margin, Rect &left, Rect &right ) : void

Splits the rect into two horizontal ones, with the left rect set to an exact width.

SplitRightHorizontalExact ( Rect rect, float rightWidth, float margin, Rect &left, Rect &right ) : void
SplitVerticalPercentage ( Rect rect, float percentage, float margin, Rect &top, Rect &bottom ) : void

Splits a rect into two, with the split occurring at a certain percentage of the rect's height.

Описание методов

CenterRect() публичный статический Метод

public static CenterRect ( Rect toCenter, float height, Rect &centered ) : void
toCenter UnityEngine.Rect
height float
centered UnityEngine.Rect
Результат void

IndentedRect() публичный статический Метод

Indents the given rect.
public static IndentedRect ( Rect source ) : Rect
source UnityEngine.Rect
Результат UnityEngine.Rect

Margin() публичный статический Метод

public static Margin ( Rect container, float horizontalMargin, float verticalMargin, Rect &smaller ) : void
container UnityEngine.Rect
horizontalMargin float
verticalMargin float
smaller UnityEngine.Rect
Результат void

MoveDown() публичный статический Метод

Moves the rect down (vertically) by the given amount. Returns an updated rect.
public static MoveDown ( Rect rect, float amount ) : Rect
rect UnityEngine.Rect
amount float
Результат UnityEngine.Rect

SplitHorizontalFlexibleMiddle() публичный статический Метод

public static SplitHorizontalFlexibleMiddle ( Rect rect, float leftWidth, float rightWidth, Rect &left, Rect &middle, Rect &right ) : void
rect UnityEngine.Rect
leftWidth float
rightWidth float
left UnityEngine.Rect
middle UnityEngine.Rect
right UnityEngine.Rect
Результат void

SplitHorizontalMiddleExact() публичный статический Метод

public static SplitHorizontalMiddleExact ( Rect rect, float middleWidth, float margin, Rect &left, Rect &middle, Rect &right ) : void
rect UnityEngine.Rect
middleWidth float
margin float
left UnityEngine.Rect
middle UnityEngine.Rect
right UnityEngine.Rect
Результат void

SplitHorizontalPercentage() публичный статический Метод

Splits a rect into two, with the split occurring at a certain percentage of the rect's width.
public static SplitHorizontalPercentage ( Rect rect, float percentage, float margin, Rect &left, Rect &right ) : void
rect UnityEngine.Rect The rect to split.
percentage float The percentage to split the rect at.
margin float The margin between the two split rects.
left UnityEngine.Rect The new left rect.
right UnityEngine.Rect The new right rect.
Результат void

SplitLeftHorizontalExact() публичный статический Метод

Splits the rect into two horizontal ones, with the left rect set to an exact width.
public static SplitLeftHorizontalExact ( Rect rect, float leftWidth, float margin, Rect &left, Rect &right ) : void
rect UnityEngine.Rect The rect to split.
leftWidth float
margin float /// The amount of space between the two rects. ///
left UnityEngine.Rect The new left rect.
right UnityEngine.Rect The new right rect.
Результат void

SplitRightHorizontalExact() публичный статический Метод

public static SplitRightHorizontalExact ( Rect rect, float rightWidth, float margin, Rect &left, Rect &right ) : void
rect UnityEngine.Rect
rightWidth float
margin float
left UnityEngine.Rect
right UnityEngine.Rect
Результат void

SplitVerticalPercentage() публичный статический Метод

Splits a rect into two, with the split occurring at a certain percentage of the rect's height.
public static SplitVerticalPercentage ( Rect rect, float percentage, float margin, Rect &top, Rect &bottom ) : void
rect UnityEngine.Rect The rect to split.
percentage float The percentage to split the rect at.
margin float The margin between the two split rects.
top UnityEngine.Rect The new top rect.
bottom UnityEngine.Rect The new bottom rect.
Результат void