All of the following functions, except for load_texture and create_font, can only be called from a paint callback
Table of Content
renderer.create_font
renderer.localize_string
renderer.draw_text
renderer.draw_localized_text
renderer.draw_line
renderer.draw_filled_rect
renderer.draw_outlined_rect
renderer.draw_filled_outlined_rect
renderer.draw_filled_gradient_rect
renderer.draw_outlined_circle
renderer.test_font
renderer.get_mouse_pos
renderer.set_mouse_pos
renderer.get_text_size
renderer.load_texture
windows_font_name - Windows font name, only supports .ttf.
tall - Font size.
weight - Font thickness/weight.
flags - Text flags, this can be a table, for example {0x001, 0x002}
Returns a special value that can be passed to draw_text, draw_localized_string, test_font and get_text_size
x - Screen coordinate
y - Screen coordinate
r - Red (1-255)
g - Green (1-255)
b - Blue (1-255)
a - Alpha (1-255)
font - Returned value of renderer.create_font
text - Text that will be drawn
text - #SFUI_ or other localized strings from csgo/resources/csgo_<language>.txt, that will be drawn
Returns the localized string
x - Screen coordinate
y - Screen coordinate
r - Red (1-255)
g - Green (1-255)
b - Blue (1-255)
a - Alpha (1-255)
font - Returned value of renderer.create_font
text - #SFUI_ or other localized strings from csgo/resources/csgo_<language>.txt, that will be drawn
x0 - Screen coordinate of point A
y0 - Screen coordinate of point A
x1 - Screen coordinate of point B
y1 - Screen coordinate of point B
r - Red (1-255)
g - Green (1-255)
b - Blue (1-255)
a - Alpha (1-255)
x - Screen coordinate
y - Screen coordinate
w - Width in pixels
h - Height in pixels
r - Red (1-255)
g - Green (1-255)
b - Blue (1-255)
a - Alpha (1-255)
x - Screen coordinate
y - Screen coordinate
w - Width in pixels
h - Height in pixels
r - Red (1-255)
g - Green (1-255)
b - Blue (1-255)
a - Alpha (1-255)
x - Screen coordinate
y - Screen coordinate
w - Width in pixels
h - Height in pixels
r0 - Filled Red (1-255)
g0 - Filled Green (1-255)
b0 - Filled Blue (1-255)
a0 - Filled Alpha (1-255)
r1 - Outline Red (1-255)
g1 - Outline Green (1-255)
b1 - Outline Blue (1-255)
a1 - Outline Alpha (1-255)
x - Screen coordinate
y - Screen coordinate
w - Width in pixels
h - Height in pixels
r0 - Red (1-255)
g0 - Green (1-255)
b0 - Blue (1-255)
a0 - Alpha (1-255)
r1 - Red (1-255)
g1 - Green (1-255)
b1 - Blue (1-255)
a1 - Alpha (1-255)
horizontal - Left to right. Pass true for horizontal gradient, or false for vertical
x - Screen coordinate
y - Screen coordinate
r - Red (1-255)
g - Green (1-255)
b - Blue (1-255)
a - Alpha (1-255)
radius - Radius of the circle in pixels.
segments - How many edges the circle should have
x - Screen coordinate
y - Screen coordinate
r - Red (1-255)
g - Green (1-255)
b - Blue (1-255)
a - Alpha (1-255)
font - Returned value of renderer.create_font
Returns current mosue coordinates x, y
x - Screen coordiantes
y - Screen coordiantes
font - Returned value of renderer.create_font
text - Text that will be measured
Returns width, height.
filename - .vmt file from csgo/materials
Returns an integer that can be passed to renderer.texture
THIN = 100
EXTRALIGHT = 200
LIGHT = 300
NORMAL = 400
MEDIUM = 500
SEMIBOLD = 600
BOLD = 700
EXTRABOLD = 800
HEAVY = 900
FONTFLAG_NONE = 0x000
FONTFLAG_ITALIC = 0x001
FONTFLAG_UNDERLINE = 0x002
FONTFLAG_STRIKEOUT = 0x004
FONTFLAG_SYMBOL = 0x008
FONTFLAG_ANTIALIAS = 0x010
FONTFLAG_GAUSSIANBLUR = 0x020
FONTFLAG_ROTARY = 0x040
FONTFLAG_DROPSHADOW = 0x080
FONTFLAG_ADDITIVE = 0x100
FONTFLAG_OUTLINE = 0x200
FONTFLAG_CUSTOM = 0x400
FONTFLAG_BITMAP = 0x800