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
Text (String)
Position (Vec2 Object)
Color (Color Object)
FontSize (Float)
Alignment (Align Enum)
Font (Font Enum)
BoxPadding (Vec2)
BoxAlpha (Float)
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
Text (String)
Position (Vec2 Object)
Color (Color Object)
Alignment (Align Enum)
FontEffect (Effect Enum)
FontSize (Float)
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
PosA (Vec2 Object)
PosB (Vec2 Object)
Color (Color Object)
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
PosA (FVector2D)
Color (Color)
Segments (Integer)
Radius (Float)
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
PosA (FVector2D)
Color (Color)
Segments (Integer)
Radius (Float)
Example
DrawCircleFilled(FVector2D(0, 0), FColor(123, 74, 34, 255), 10, 30.0)
DrawRectangle
Draws a rectangle on the screen.
Parameters
PosA (Vec2)
PosB (Vec2)
Color (Color)
Thickness (Float)
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
PosA (FVector2D)
PosB (FVector2D)
Color (Color)
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
PosA (FVector2D)
PosB (FVector2D)
PosC (FVector2D)
Color (Color)
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
PosA (FVector2D)
PosB (FVector2D)
PosC (FVector2D)
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
PosA (FVector2D)
PosB (FVector2D)
TopLeftColor (FColor)
TopRightColor (FColor)
BottomRightColor (FColor)
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