âïļRender
render namespace
Enums
Datatypes
color
r
number
red channel (0-255)
â
g
number
green channel (0-255)
â
b
number
blue channel (0-255)
â
a
number
alpha channel (0-255)
255
hex_code
string
hex color code
Returns:
table with rgba values
table
Table structure:
esp_flag
text
string
flag to draw
color
color to draw
Fonts
create_font
font_path
string
path to font or name of font
â
size
number
font size
â
flags
font flag
0
from
number
0
to
number
255
Returns:
font id
number
create_font_gdi
font_path
string
path to font or name of font
â
size
number
font size
â
flags
font flag
0
from
number
0
to
number
255
Returns:
font id
number
create_font_stream
bytes
table
table of bytes
â
size
number
font size
â
flags
font flag
0
from
number
0
to
number
255
Returns:
font id
number
get_text_size
font
number
text
string
string to measure
Returns:
width
number
height
number
wrap_text
font
number
text
string
string to measure
width
number
target text width
Returns:
text
string
text
font
number
font id
â
x
number
first x coord
â
y
number
first y coord
â
text
string
text to draw
â
color
table
â
align_horizontal
number
horizontal alignment type
align_vertical
number
vertical alignment type
align_line
number
multiline alignment type
Pre-defined fonts:
font_gui_main
font_gui_title
font_gui_bold
font_esp
font_esp_name
font_indicator
Shaders
create_shader
src
string
shader source code
Supported pre-defined shader parameters:
Register
Type
s0
sampler
current texture
c0
float2
current texture's dimensions
c1
float
current time in seconds
c2
float
current global alpha override
Returns:
shader id
number
set_shader
shader_id
number / nil
shader id returned from render.create_shader
Usage:
Sets or resets a shader.
Textures
create_texture
texture_path
string
path to texture
Supported image formats:
JPEG
PNG
BMP
GIF (non-animated)
TGA
PSD
HDR
PIC
PNM (binary only)
Returns:
texture id
number
create_texture_bytes
bytes
unsigned char*
array of bytes
size
number
texture size
Supported Image Formats:
JPEG
PNG
BMP
GIF (non-animated)
TGA
PSD
HDR
PIC
PNM (binary only)
Returns:
texture id
number
Note:
This function can only be used by utilizing the ffi library as it requires a byte array. One way to do such would be using ISteamUtils::GetImageRGBA.
create_texture_rgba
bytes
unsigned char*
array of bytes
w
number
texture width
h
number
texture height
row_stride
number
number of bytes in each row (image width * 4)
Supported Image Formats:
JPEG
PNG
BMP
GIF (non-animated)
TGA
PSD
HDR
PIC
PNM (binary only)
Returns:
texture id
number
Note:
This function can only be used by utilizing the ffi library as it requires a byte array. One way to do such would be using ISteamUtils::GetImageRGBA.
create_texture_stream
byte_stream
table of bytes
texture bytes
Returns:
texture id
number
create_texture_svg
image
string
svg data or svg file path
target_height
number
desired image height
Returns:
texture id
number
push_texture / set_texture
texture_id
number
texture id returned from render.create_texture
Pre-defined textures:
texture_logo_head
texture_logo_stripes
texture_cursor
texture_loading
texture_icon_up
texture_icon_down
texture_icon_clear
texture_icon_copy
texture_icon_pase
texture_icon_add
texture_icon_search
texture_icon_settings
texture_icon_bug
texture_icon_rage
texture_icon_legit
texture_icon_visuals
texture_icon_misc
texture_icon_scripts
texture_icon_skins
texture_avatar
Usage:
Sets a texture used by render functions.
pop_texture
Usage:
Pops a previously used texture
push_uv / set_uv
x1
number
min x coord (0 - 1)
y1
number
min y coord (0 - 1)
x2
number
max x coord (0 - 1)
y2
number
max y coord (0 - 1)
Usage:
Adjusts texture coordinates. Use after calling render.push_texture.
pop_uv
Usage:
Pops a previously used set of texture coordinates.
get_texture_size
texture_id
number
Returns:
width
number
height
number
get_frame_count
texture_id
number
Returns:
framecount
number
This function will return 0 if a texture is NOT an animated GIF.
Drawing
get_screen_size
Returns:
width
number
height
number
push_clip_rect
x1
number
min x point
â
y1
number
min y point
â
x2
number
max x point
â
x2
number
max y point
â
intersect
boolean
should it intersect with existing clip rects
false
Usage:
Pushes a clip rect so elements can only be drawn within the rect.
Make sure to follow the call with render.pop_clip_rect!
Failure to do so will result in undefined behavior!
pop_clip_rect
Usage:
Pops a previously used clip rect
rect_filled
x1
number
min x point
y1
number
min y point
x2
number
max x point
y2
number
max y point
color
table
Usage:
Draws a filled rectangle. Use render.push_texture to apply a texture to the shape.
rect
x1
number
min x point
â
y1
number
min y point
â
x2
number
max x point
â
y2
number
max y point
â
color
table
â
thickness
float
thickness of line
1.f
outline
number
outline type
rect_rounded
x1
number
min x point
â
y1
number
min y point
â
x2
number
max x point
â
y2
number
max y point
â
color
table
â
rounding
number
amount of rounding
â
rounding_flags
number
corners to round
thickness
float
thickness of line
1.f
outline
number
outline type
Usage:
Draws a filled rounded rectangle. Use render.push_texture to apply a texture to the shape.
rect_filled_rounded
x1
number
min x point
â
y1
number
min y point
â
x2
number
max x point
â
y2
number
max y point
â
color
table
â
rounding
number
amount of rounding
â
rounding_flags
number
corners to round
Usage:
Draws a filled rounded rectangle. Use render.push_texture to apply a texture to the shape.
rect_filled_multicolor
x1
number
min x point
y1
number
min y point
x2
number
max x point
y2
number
max y point
top_left
table
top_right
table
bottom_right
table
bottom_left
table
Usage:
Draws a multi-color rectangle.
circle_filled
x
number
center x point
â
y
number
center y point
â
radius
number
the circles radius
â
color
table
â
segments
number
number of points (circle resolution)
12
percentage
number
how much of the circle is drawn (0 - 1)
1
angle
number
circle rotation (0 - 360Draws a filled multi-color rectangle.)
0
Usage:
Draws a filled circle. Use render.push_texture to apply a texture to the shape.
circle
x
number
center x point
â
y
number
center y point
â
radius
number
the circles radius
â
color
table
â
thickness
number
thickness of the circle in pixels
1
segments
number
number of points (circle resolution)
12
percentage
number
how much of the circle is drawn (0 - 1)
1
angle
number
circle rotation (0 - 360)
0
line
x1
number
first x coord
y1
number
first y coord
x2
number
second x coord
y2
number
second y coord
color
table
line_multicolor
x1
number
first x coord
y1
number
first y coord
x2
number
second x coord
y2
number
second y coord
color
table
color2
table
triangle_filled
x1
number
first x coord
y1
number
first y coord
x2
number
second x coord
y2
number
second y coord
x3
number
third x coord
y3
number
third y coord
color
table
Usage:
Draws a filled triangle. Use render.push_texture to apply a texture to the shape.
triangle
x1
number
first x coord
y1
number
first y coord
x2
number
second x coord
y2
number
second y coord
x3
number
third x coord
y3
number
third y coord
color
table
triangle_filled_multicolor
x1
number
first x coord
y1
number
first y coord
x2
number
second x coord
y2
number
second y coord
x3
number
third x coord
y3
number
third y coord
color1
table
color2
table
color3
table
Animations
create_animator_float
initial_value
starting value
â
duration
number
how long to take in seconds
â
easing_type
the animation type
Returns:
animator object
create_animator_color
initial_value
starting value
â
duration
number
how long to take in seconds
â
easing_type
the animation type
interpolate_hue
boolean
should the hue be animated
false
Returns:
animator object
Last updated