βοΈ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 structure:
esp_flag
Fonts
create_font
font_path
string
path to font or name of font
β
size
number
font size
β
Returns:
create_font_gdi
font_path
string
path to font or name of font
β
size
number
font size
β
Returns:
create_font_stream
bytes
table
table of bytes
β
size
number
font size
β
Returns:
get_text_size
Returns:
wrap_text
text
string
string to measure
width
number
target text width
Returns:
text
x
number
first x coord
β
y
number
first y coord
β
text
string
text to draw
β
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:
s0
sampler
current texture
c0
float2
current texture's dimensions
c1
float
current time in seconds
c2
float
current global alpha override
Returns:
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:
create_texture_bytes
Supported Image Formats:
JPEG
PNG
BMP
GIF (non-animated)
TGA
PSD
HDR
PIC
PNM (binary only)
Returns:
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:
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:
create_texture_svg
image
string
svg data or svg file path
target_height
number
desired image height
Returns:
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
Returns:
get_frame_count
Returns:
This function will return 0 if a texture is NOT an animated GIF.
Drawing
get_screen_size
Returns:
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
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
β
thickness
float
thickness of line
1.f
rect_rounded
x1
number
min x point
β
y1
number
min y point
β
x2
number
max x point
β
y2
number
max y point
β
rounding
number
amount of rounding
β
thickness
float
thickness of line
1.f
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
β
rounding
number
amount of rounding
β
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
Usage:
Draws a multi-color rectangle.
circle_filled
x
number
center x point
β
y
number
center y point
β
radius
number
the circles radius
β
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
β
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
line_multicolor
x1
number
first x coord
y1
number
first y coord
x2
number
second x coord
y2
number
second y coord
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
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
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
Animations
create_animator_float
duration
number
how long to take in seconds
β
Returns:
create_animator_color
duration
number
how long to take in seconds
β
interpolate_hue
boolean
should the hue be animated
false
Returns:
Last updated