C# Class RSTUtils.Extensions.RectExtensions

Mostra file Open project: KSP-RO/TacLifeSupport

Public Methods

Method Description
ClampInsideScreen ( this value ) : Rect

Clamps the rectangle inside the screen region.

ClampToScreen ( this value, float margin = 25.0f ) : Rect

Clamps the rectangle into the screen region by the specified margin.

MouseIsOver ( this value ) : bool

Returns whether the mouse is within the coordinates of this rectangle.

Translate ( this value, Rect rectangle ) : Rect

Method Details

ClampInsideScreen() public static method

Clamps the rectangle inside the screen region.
public static ClampInsideScreen ( this value ) : Rect
value this
return UnityEngine.Rect

ClampToScreen() public static method

Clamps the rectangle into the screen region by the specified margin.
public static ClampToScreen ( this value, float margin = 25.0f ) : Rect
value this
margin float
return UnityEngine.Rect

MouseIsOver() public static method

Returns whether the mouse is within the coordinates of this rectangle.
public static MouseIsOver ( this value ) : bool
value this
return bool

Translate() public static method

public static Translate ( this value, Rect rectangle ) : Rect
value this
rectangle UnityEngine.Rect
return UnityEngine.Rect