render
the render.* functions can only be called from within a few select callbacks, make sure you check if the callback youre in right now supports it
create_font
Creates a font object
Only call this OUTSIDE of callbacks to prevent infinite font creation and crashing
Fields | Description |
---|---|
| render font name |
| size of created font |
| weight of created font |
| [optional] [variadic] font flags |
Example
text
Renders text
Fields | Description |
---|---|
| font object |
| text to render |
| position of text |
| color of text |
| should text be centered |
Example
get_text_size
Returns size of text as a vec2_t
Fields | Description |
---|---|
| render font object |
| text to measure |
Example
weapon_icon
renders the weapon icon of the specified weapon id
Fields | Description |
---|---|
| weapon id to render |
| position of text |
| color of text |
| should text be centered |
Example
get_default_font
Returns the cheat's default font
Example
push_clip
Pushes a clip onto render elements
Fields | Description |
---|---|
| clip start |
| clip size |
Example
pop_clip
Stops all other render calls from being clipped
Example
push_alpha_modifier
Pushes a alpha modifier onto render elements
Fields | Description |
---|---|
| alpha modifier |
Example
pop_alpha_modifier
Stops all other elements from having their alpha modified
Example
get_screen_size
Returns current screen size as a vec2_t
Example
line
Renders a 2D line
Fields | Description |
---|---|
| starting point |
| end point |
| line color |
Example
rect
Renders a 2D rectangle
Fields | Description |
---|---|
| x and y coordinates |
| rectangle width and height |
| rectangle color |
| rectangle rounding |
Example
rect_filled
Renders a 2D filled rectangle
Fields | Description |
---|---|
| x and y coordinates |
| rectangle width and height |
| rectangle fill color |
| rectangle fill rounding |
Example
rect_fade
Renders a 2D rectangle with a gradient
Fields | Description |
---|---|
| x and y coordinates |
| rectangle width and height |
| rectangle gradient color start |
| rectangle gradient color end |
| [optional] makes the gradient horizontal |
Example
triangle
Renders a 2D triangle
Fields | Description |
---|---|
| x and y coordinates |
| triangle size |
| triangle color |
| [optional] triangle rotation |
Example
triangle_filled
Renders a 2D triangle
Fields | Description |
---|---|
| x and y coordinates |
| triangle size |
| triangle color |
| [optional] triangle rotation |
Example
circle
Renders a 2D circle
Fields | Description |
---|---|
| x and y coordinates |
| circle size |
| circle color |
|
Example
circle_filled
Renders a 2D filled circle
Fields | Description |
---|---|
| x and y coordinates |
| circle size |
| circle fill color |
Example
progress_circle
Renders a 2D progress_circle
Fields | Description |
---|---|
| x and y coordinates |
| progress bar size |
| progress bar color |
| progress bar width |
| progress value |
Example
polygon
Renders a 2D polygon
Fields | Description |
---|---|
| array of 2D points |
| polygon color |
Example
polyline
Renders a 2D polyline
Fields | Description |
---|---|
| array of 2D points |
| polygon color |
Example
world_to_screen
Returns 2D coordinates for a 3D world point or nil on failure
Fields | Description |
---|---|
| x, y, z coordinates |
Example
load_image
loads an image from a path and returns a texture supports .jpg, .jpeg, .png, .svg, .tga, .bmp
load_image_buffer
loads an image from the raw file (has to include header) and returns a texture supports .jpg, .jpeg, .png, .svg, .tga, .bmp
texture
renders a texture received from load_image or load_image_buffer
Example
Last updated