GearBlocks
The GearBlocks Lua scripting API
Public Member Functions | Properties | List of all members
SmashHammer.UI.IShapes Interface Reference

Provides access to a UI shapes properties. More...

Inheritance diagram for SmashHammer.UI.IShapes:
SmashHammer.UI.Shapes

Public Member Functions

void AddQuad (Vector2Proxy pos, Vector2Proxy size)
 Add a quad shape.
 
void AddQuad (Vector2Proxy pos, Vector2Proxy size, Color32Proxy colour)
 Add a quad shape.
 
void AddConvexPrimitive (IList< Vector2Proxy > vertices)
 Add a convex primitive shape.
 
void AddConvexPrimitive (IList< Vector2Proxy > vertices, Color32Proxy colour)
 Add a convex primitive shape.
 
void AddLine (IList< Vector2Proxy > points, float thickness)
 Add a thick line shape.
 
void AddLine (IList< Vector2Proxy > points, float thickness, Color32Proxy colour)
 Add a thick line shape.
 
void Clear ()
 Clear the current shapes.
 

Properties

RectProxy PixelRect [get]
 The UI element's pixel rect.
 

Detailed Description

Provides access to a UI shapes properties.

Member Function Documentation

◆ AddQuad() [1/2]

void SmashHammer.UI.IShapes.AddQuad ( Vector2Proxy  pos,
Vector2Proxy  size 
)

Add a quad shape.

Parameters
posThe position of the quad's bottom left corner.
sizeThe width and height of the quad.

Implemented in SmashHammer.UI.Shapes.

◆ AddQuad() [2/2]

void SmashHammer.UI.IShapes.AddQuad ( Vector2Proxy  pos,
Vector2Proxy  size,
Color32Proxy  colour 
)

Add a quad shape.

Parameters
posThe position of the quad's bottom left corner.
sizeThe width and height of the quad.
colourThe colour of the quad.

Implemented in SmashHammer.UI.Shapes.

◆ AddConvexPrimitive() [1/2]

void SmashHammer.UI.IShapes.AddConvexPrimitive ( IList< Vector2Proxy vertices)

Add a convex primitive shape.

Parameters
verticesA list of vertices in clockwise order.

Implemented in SmashHammer.UI.Shapes.

◆ AddConvexPrimitive() [2/2]

void SmashHammer.UI.IShapes.AddConvexPrimitive ( IList< Vector2Proxy vertices,
Color32Proxy  colour 
)

Add a convex primitive shape.

Parameters
verticesA list of vertices in clockwise order.
colourThe colour of the primitive.

Implemented in SmashHammer.UI.Shapes.

◆ AddLine() [1/2]

void SmashHammer.UI.IShapes.AddLine ( IList< Vector2Proxy points,
float  thickness 
)

Add a thick line shape.

Parameters
pointsA list of points that will be joined up in order by the line.
thicknessThe line's thickness in pixels.

Implemented in SmashHammer.UI.Shapes.

◆ AddLine() [2/2]

void SmashHammer.UI.IShapes.AddLine ( IList< Vector2Proxy points,
float  thickness,
Color32Proxy  colour 
)

Add a thick line shape.

Parameters
pointsA list of points that will be joined up in order by the line.
thicknessThe line's thickness in pixels.
colourThe colour of the line.

Implemented in SmashHammer.UI.Shapes.

Property Documentation

◆ PixelRect

RectProxy SmashHammer.UI.IShapes.PixelRect
get

The UI element's pixel rect.

This element's rect, adjusted to be pixel perfect.