renderer
get_screen_size(): vec2_t
Returns the width and height of the game's window
create_font( identifier, font_name, size, weight, flags )
Creates a new font object
Type
Name
Description
string
identifier
A unique identifier for your font
string
font_name
The font's name
int
size
The font's size
int
weight
The font's weight
int
flags
The font's flags
text( font, x, y, text, flags, color )
Draws a string at the two given points
Type
Name
Description
object
font
The font you want the text to be drawn in
int
x
The position on the x axis
int
y
The position on the y axis
string
text
The text you want to draw
int
flags
The alignment flags you want to use
color_t
color
The color you want the text to be
get_text_size( font, text ): vec2_t
Returns the width and height of the given string
Type
Name
Description
object
font
The font you want the text to eventually be drawn in
string
text
The text you want to check the size of
line( x0, y0, x1, y1, color )
Draws a line in the given color between the two given points.
Type
Name
Description
float
x0
Starting position on the x axis
float
y0
Starting position on the y axis
float
x1
Ending position on the x axis
float
y1
Ending position on the y axis
color_t
color
The color you want the line to be
rect( x, y, w, y, color )
Draws a rectangle (not filled) between the two given points.
Type
Name
Description
float
x
Starting position on the x axis
float
y
Starting position on the y axis
float
w
How wide the rectangle should be
float
h
How tall the rectangle should be
color_t
color
The color you want the rectangle to be
rect_filled( x, y, w, h, color )
Draws a rectangle (filled) between the two given points.
Type
Name
Description
float
x
Starting position on the x axis
float
y
Starting position on the y axis
float
w
How wide the rectangle should be
float
h
How tall the rectangle should be
color_t
color
The color you want the rectangle to be
rect_filled_fade( x, y, w, h, color, a0, a1 )
Draws a rectangle (filled) between the two given points that fades from the first alpha, to the second.
Type
Name
Description
float
x
Starting position on the x axis
float
y
Starting position on the y axis
float
w
How wide the rectangle should be
float
h
How tall the rectangle should be
color_t
color
The color you want the rectangle to be
float
a0
The starting alpha
float
a1
The ending alpha
rect_filled_gradient( x, y, w, h, color0, color1 )
Draws a rectangle (filled) between the two given points that fades from the first color to the second.
Type
Name
float
x
Starting position on the x axis
float
y
Starting position on the y axis
float
w
How wide the rectangle should be
float
h
How tall the rectangle should be
color_t
color0
The starting color
color_t
color1
The ending color
circle( x, y, radius, segments, color )
Draws a circle (not filled) at the two given points.
Type
Name
Description
float
x
The position on the x axis
float
y
The position on the y axis
int
radius
How big the circle should be
int
segments
How many segments should be used to the create the circle
color_t
color
The color you want the circle to be
circle_filled( x, y, radius, segments, color )
Draws a circle (filled) at the two given points
Type
Name
Description
float
x
The position on the x axis
float
y
The position on the y axis
int
radius
How big the circle should be
int
segments
How many segments should be used to the create the circle
color_t
color
The color you want the circle to be
Last updated
Was this helpful?