GearBlocks
The GearBlocks Lua scripting API
Public Member Functions | List of all members
SmashHammer.UI.Shapes Class Reference

A shapes UI element. More...

Inheritance diagram for SmashHammer.UI.Shapes:
SmashHammer.UI.Element SmashHammer.UI.IShapes SmashHammer.UI.IImage SmashHammer.UI.IElement SmashHammer.UI.ISizeable SmashHammer.UI.IRotatable

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.
 
void SetAlignment (Align align, float paramA, float paramB)
 Set the element's alignment.
 
void SetRotation (float angle)
 Set the element's rotation.
 
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.
 

Additional Inherited Members

- Public Types inherited from SmashHammer.UI.ISizeable
enum  Align : byte {
  LeftEdge , RightEdge , TopEdge , BottomEdge ,
  HorizEdges , VertEdges , HorizCentre , VertCentre
}
 UI element alignment mode. More...
 
- Properties inherited from SmashHammer.UI.Element
virtual bool IsVisible [get, set]
 Is the element visible?
 
- Properties inherited from SmashHammer.UI.IElement
bool IsVisible [get, set]
 Is the element visible?
 
bool IsInteractable [get, set]
 Is the element interactable?
 
bool IsTargetable [get, set]
 Is the element targetable?
 
- Properties inherited from SmashHammer.UI.IShapes
RectProxy PixelRect [get]
 The UI element's pixel rect.
 
- Properties inherited from SmashHammer.UI.IImage
TextureProxy Texture [get, set]
 The image's texture.
 
RectProxy UVRect [get, set]
 The image's texture UV rect.
 
Color32Proxy Colour [get, set]
 The image's colour.
 

Detailed Description

A shapes UI element.

Member Function Documentation

◆ AddQuad() [1/2]

void SmashHammer.UI.Shapes.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.

Implements SmashHammer.UI.IShapes.

◆ AddQuad() [2/2]

void SmashHammer.UI.Shapes.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.

Implements SmashHammer.UI.IShapes.

◆ AddConvexPrimitive() [1/2]

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

Add a convex primitive shape.

Parameters
verticesA list of vertices in clockwise order.

Implements SmashHammer.UI.IShapes.

◆ AddConvexPrimitive() [2/2]

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

Add a convex primitive shape.

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

Implements SmashHammer.UI.IShapes.

◆ AddLine() [1/2]

void SmashHammer.UI.Shapes.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.

Implements SmashHammer.UI.IShapes.

◆ AddLine() [2/2]

void SmashHammer.UI.Shapes.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.

Implements SmashHammer.UI.IShapes.