Drawing

All stuff needed for drawing.

Enums

Align

  • LEFT

  • CENTER

  • RIGHT

Effect

  • SHADOW

  • OUTLINE

  • NONE

Font

  • NORMAL

  • BOLD

  • EMOJI


Functions

DrawBoxedText

Draws the AW stylized "boxed text" (box around text). This is if you want your drawing to look in-line with the UI style.

Parameters

  1. Text (String)

  2. Position (Vec2 Object)

  3. Color (Color Object)

  4. FontSize (Float)

  5. Alignment (Align Enum)

  6. Font (Font Enum)

  7. BoxPadding (Vec2)

  8. BoxAlpha (Float)

  9. BoxRounding (Float)

Example

-- Parameters commonly used with a lot of AW's built in ESP elements are as followd:
-- BoxPadding = { 2, 2 }
-- BoxAlpha = 0.5
-- BoxRounding = 4.0
-- Font = Font.BOLD
local color = FColor(255, 255, 255, 255)
local pos = FVector2D(500, 500)
DrawBoxedText('Ship', pos, color, 12.0, Align.CENTER, Font.BOLD, FVector2D(2, 2), 0.5, 4.0)

DrawText

Draws text on the screen.

Parameters

  1. Text (String)

  2. Position (Vec2 Object)

  3. Color (Color Object)

  4. Alignment (Align Enum)

  5. FontEffect (Effect Enum)

  6. FontSize (Float)

  7. Font (Font Enum)

Example

local textColor = FColor(255, 255, 255, 255) -- white
local pos = FVector2D(500, 500)
DrawText('Some text', pos, textColor, Align.CENTER, Effect.NONE, 12.0, Font.BOLD)

DrawLine

Draws a line on the screen.

Parameters

  1. PosA (Vec2 Object)

  2. PosB (Vec2 Object)

  3. Color (Color Object)

  4. Thickness (Float)

Example

local color = FColor(255, 255, 255, 255) -- white
DrawLine(FVector2D(0, 0), FVector2D(1920, 1080), color, 1.0)
-- will draw a white 1px line that goes from top-left corner to the bottom-right

DrawCircle

Draws a circle on the screen.

Parameters

  1. PosA (FVector2D)

  2. Color (Color)

  3. Segments (Integer)

  4. Radius (Float)

  5. Thickness (Float)

Example

local color = FColor(255, 255, 255, 255) -- white
DrawCircle(FVector2D(0, 0), color, 10, 30.0, 1.0)

DrawCircleFilled

Draws a filled circle on the screen.

Parameters

  1. PosA (FVector2D)

  2. Color (Color)

  3. Segments (Integer)

  4. Radius (Float)

Example

DrawCircleFilled(FVector2D(0, 0), FColor(123, 74, 34, 255), 10, 30.0)

DrawRectangle

Draws a rectangle on the screen.

Parameters

  1. PosA (Vec2)

  2. PosB (Vec2)

  3. Color (Color)

  4. Thickness (Float)

  5. Rounding (Float)

Example

DrawRectangle(FVector2D(0, 0), FVector2D(1920, 1080), FColor(255, 255, 0, 255), 5.0, 0.0)

DrawRectangleFilled

Draws a filled rectangle on the screen.

Parameters

  1. PosA (FVector2D)

  2. PosB (FVector2D)

  3. Color (Color)

  4. Rounding (Float)

Example

DrawRectangleFilled(FVector2D(0, 0), FVector2D(1920, 1080), FColor(0, 0, 0, 255), 0.0)


DrawTriangle

Draws a triangle on the screen.

Parameters

  1. PosA (FVector2D)

  2. PosB (FVector2D)

  3. PosC (FVector2D)

  4. Color (Color)

  5. Thickness (Float)

Example

DrawTriangle(FVector2D(0, 0), FVector2D(25, 25), FVector2D(75, 75), FColor(0, 0, 0, 255), 3.0)


DrawTriangleFilled

Draws a triangle filled on the screen.

Parameters

  1. PosA (FVector2D)

  2. PosB (FVector2D)

  3. PosC (FVector2D)

  4. Color (Color)

Example

DrawTriangleFilled(FVector2D(0, 0), FVector2D(25, 25), FVector2D(75, 75), FColor(0, 0, 0, 255))

DrawRectangleGradient

Draws a multi-coloured filled rectangle.

Parameters

  1. PosA (FVector2D)

  2. PosB (FVector2D)

  3. TopLeftColor (FColor)

  4. TopRightColor (FColor)

  5. BottomRightColor (FColor)

  6. BottomLeftColor (FColor)

Example

DrawRectangleGradient(FVector2D(0, 0), FVector2D(25, 25), FColor(255, 0, 0, 255), FColor(0, 255, 0, 255),  FColor(0, 0, 255, 255), FColor(0, 0, 255, 255))

Last updated