Photon Quantum 3.0.0

Static Public Member Functions | List of all members
Quantum.EditorRectUtils Class Reference

Unity custom editor GUI utility functions. More...

Static Public Member Functions

static Rect AddHeight (this Rect r, float h)
 Add a delta to the height of the rect. More...
 
static Rect AddWidth (this Rect r, float w)
 Add a delta to the width of the rect. More...
 
static Rect AddX (this Rect r, float x)
 Add to the x component of the rect. More...
 
static Rect AddXMax (this Rect r, float x)
 Add to the xMax component of the rect. More...
 
static Rect AddXMin (this Rect r, float x)
 Add to the xMin component of the rect. More...
 
static Rect AddXY (this Rect r, float x, float y)
 Add position delta to the rect. More...
 
static Rect AddXY (this Rect r, Vector2 xy)
 Add a delta to the position Rect.x and Rect.y. More...
 
static Rect AddY (this Rect r, float y)
 Add to the y component of the rect. More...
 
static Rect AddYMax (this Rect r, float y)
 Add to the yMax component of the rect. More...
 
static Rect AddYMin (this Rect r, float y)
 Add to the yMin component of the rect. More...
 
static Rect Adjust (this Rect r, float x, float y, float w, float h)
 Add to x,y, width and height component of the rect. More...
 
static Rect SetHeight (this Rect r, float h)
 Set the height of a rect. More...
 
static Rect SetWidth (this Rect r, float w)
 Set the width of rect. More...
 
static Rect SetWidthHeight (this Rect r, float w, float h)
 Set the height and the width of the rect. More...
 
static Rect SetWidthHeight (this Rect r, Vector2 v)
 Set the height and the width of the rect. More...
 
static Rect SetX (this Rect r, float x)
 Set the x component of the rect. More...
 
static Rect SetXMax (this Rect r, float x)
 Set the xMin component of the rect. More...
 
static Rect SetXMin (this Rect r, float x)
 Set the xMin component of the rect. More...
 
static Rect SetY (this Rect r, float y)
 Set the y component of the rect. More...
 
static Rect SetYMax (this Rect r, float y)
 The set yMax component of the rect. More...
 
static Rect SetYMin (this Rect r, float y)
 Set the yMin component of the rect. More...
 
static Rect ToRect (this Vector2 v, float w, float h)
 Create a rect with the given position and size. More...
 
static Vector2 ToVector2 (this Rect r)
 Convert the rect width and height to a vector2. More...
 
static Rect ZeroXY (this Rect r)
 Set the position to zero. More...
 

Detailed Description

Unity custom editor GUI utility functions.

Member Function Documentation

◆ SetWidth()

static Rect Quantum.EditorRectUtils.SetWidth ( this Rect  r,
float  w 
)
inlinestatic

Set the width of rect.

Parameters
rRect
wNew width
Returns
The new rect

◆ SetWidthHeight() [1/2]

static Rect Quantum.EditorRectUtils.SetWidthHeight ( this Rect  r,
Vector2  v 
)
inlinestatic

Set the height and the width of the rect.

Parameters
rRect
vX component is set as width, y component is set as height
Returns
The new rect

◆ SetWidthHeight() [2/2]

static Rect Quantum.EditorRectUtils.SetWidthHeight ( this Rect  r,
float  w,
float  h 
)
inlinestatic

Set the height and the width of the rect.

Parameters
rRect
wThe new width
hThe new height
Returns
The new rect

◆ AddWidth()

static Rect Quantum.EditorRectUtils.AddWidth ( this Rect  r,
float  w 
)
inlinestatic

Add a delta to the width of the rect.

Parameters
rRect
wWidth delta to apply
Returns
The new rect

◆ AddHeight()

static Rect Quantum.EditorRectUtils.AddHeight ( this Rect  r,
float  h 
)
inlinestatic

Add a delta to the height of the rect.

Parameters
rRect
hHeight delta to apply
Returns
The new rect

◆ SetHeight()

static Rect Quantum.EditorRectUtils.SetHeight ( this Rect  r,
float  h 
)
inlinestatic

Set the height of a rect.

Parameters
rRect
hThe new height value
Returns
The new rect

◆ AddXY() [1/2]

static Rect Quantum.EditorRectUtils.AddXY ( this Rect  r,
Vector2  xy 
)
inlinestatic

Add a delta to the position Rect.x and Rect.y.

Parameters
rRect
xyPosition delta to be added
Returns
The new rect

◆ AddXY() [2/2]

static Rect Quantum.EditorRectUtils.AddXY ( this Rect  r,
float  x,
float  y 
)
inlinestatic

Add position delta to the rect.

Parameters
rRect
xAdd to Rect.x
yAdd to Rect.y
Returns
The new rect

◆ AddX()

static Rect Quantum.EditorRectUtils.AddX ( this Rect  r,
float  x 
)
inlinestatic

Add to the x component of the rect.

Parameters
rRect
xValue to add to Rect.x
Returns
The new rect

◆ AddY()

static Rect Quantum.EditorRectUtils.AddY ( this Rect  r,
float  y 
)
inlinestatic

Add to the y component of the rect.

Parameters
rRect
yValue to add to Rect.y
Returns
The new rect

◆ SetY()

static Rect Quantum.EditorRectUtils.SetY ( this Rect  r,
float  y 
)
inlinestatic

Set the y component of the rect.

Parameters
rRect
yValue to set as Rect.y
Returns
The new rect

◆ SetX()

static Rect Quantum.EditorRectUtils.SetX ( this Rect  r,
float  x 
)
inlinestatic

Set the x component of the rect.

Parameters
rRect
xValue to set as Rect.x
Returns
The new rect

◆ SetXMin()

static Rect Quantum.EditorRectUtils.SetXMin ( this Rect  r,
float  x 
)
inlinestatic

Set the xMin component of the rect.

Parameters
rRect
xValue to set as Rect.xMin
Returns
The new rect

◆ SetXMax()

static Rect Quantum.EditorRectUtils.SetXMax ( this Rect  r,
float  x 
)
inlinestatic

Set the xMin component of the rect.

Parameters
rRect
xValue to set as Rect.xMax
Returns
The new rect

◆ SetYMin()

static Rect Quantum.EditorRectUtils.SetYMin ( this Rect  r,
float  y 
)
inlinestatic

Set the yMin component of the rect.

Parameters
rRect
yValue to set as Rect.yMin
Returns
The new rect

◆ SetYMax()

static Rect Quantum.EditorRectUtils.SetYMax ( this Rect  r,
float  y 
)
inlinestatic

The set yMax component of the rect.

Parameters
rRect
yValue to set as Rect.yMax
Returns
The new rect

◆ AddXMin()

static Rect Quantum.EditorRectUtils.AddXMin ( this Rect  r,
float  x 
)
inlinestatic

Add to the xMin component of the rect.

Parameters
rRect
xValue to add to Rect.xMin
Returns
The new rect

◆ AddXMax()

static Rect Quantum.EditorRectUtils.AddXMax ( this Rect  r,
float  x 
)
inlinestatic

Add to the xMax component of the rect.

Parameters
rRect
xValue to add to Rect.xMax
Returns
The new rect

◆ AddYMin()

static Rect Quantum.EditorRectUtils.AddYMin ( this Rect  r,
float  y 
)
inlinestatic

Add to the yMin component of the rect.

Parameters
rRect
yValue to add to Rect.yMin
Returns
The new rect

◆ AddYMax()

static Rect Quantum.EditorRectUtils.AddYMax ( this Rect  r,
float  y 
)
inlinestatic

Add to the yMax component of the rect.

Parameters
rRect
yThe value to add to Rect.yMax
Returns
The new rect

◆ Adjust()

static Rect Quantum.EditorRectUtils.Adjust ( this Rect  r,
float  x,
float  y,
float  w,
float  h 
)
inlinestatic

Add to x,y, width and height component of the rect.

Parameters
rRect
xValue to add to Rect.x
yValue to add to Rect.y
wValue to add to Rect.width
hValue to add to Rect.height
Returns
The new rect

◆ ToRect()

static Rect Quantum.EditorRectUtils.ToRect ( this Vector2  v,
float  w,
float  h 
)
inlinestatic

Create a rect with the given position and size.

Parameters
vRect position
wRect width
hRect height
Returns
The new rect

◆ ZeroXY()

static Rect Quantum.EditorRectUtils.ZeroXY ( this Rect  r)
inlinestatic

Set the position to zero.

Parameters
rRect
Returns
The new rect

◆ ToVector2()

static Vector2 Quantum.EditorRectUtils.ToVector2 ( this Rect  r)
inlinestatic

Convert the rect width and height to a vector2.

Parameters
rRect
Returns
The width (x) and height (y)