· 6 years ago · Dec 08, 2019, 05:06 PM
1GameSense API for Lua
2GameSense API for Lua
3cvar.set_string
4cvar.get_string
5cvar.set_float
6cvar.set_raw_float
7cvar.get_float
8cvar.set_int
9cvar.set_raw_int
10cvar.get_int
11cvar.invoke_callback
12globals.realtime
13globals.curtime
14globals.frametime
15globals.absoluteframetime
16globals.maxplayers
17globals.tickcount
18globals.tickinterval
19globals.framecount
20globals.mapname
21globals.lastoutgoingcommand
22entity.get_local_player
23entity.get_all
24entity.get_players
25entity.get_game_rules
26entity.get_player_resource
27entity.get_classname
28entity.set_prop
29entity.get_prop
30entity.is_enemy
31entity.is_alive
32entity.is_dormant
33entity.get_player_name
34entity.get_player_weapon
35entity.hitbox_position
36entity.get_steam64
37entity.get_bounding_box
38client.set_event_callback
39client.log
40client.color_log
41client.exec
42client.userid_to_entindex
43client.draw_debug_text
44client.draw_hitboxes
45client.random_int
46client.random_float
47client.screen_size
48client.visible
49client.trace_line
50client.trace_bullet
51client.scale_damage
52client.delay_call
53client.latency
54client.camera_angles
55client.camera_angles
56client.timestamp
57client.eye_position
58client.set_clan_tag
59client.system_time
60client.reload_active_scripts
61ui.new_checkbox
62ui.new_slider
63ui.new_combobox
64ui.new_multiselect
65ui.new_hotkey
66ui.new_button
67ui.new_color_picker
68ui.new_textbox
69ui.reference
70ui.set
71ui.get
72ui.set_callback
73ui.set_visible
74ui.is_menu_open
75ui.mouse_position
76renderer.text
77renderer.measure_text
78renderer.rectangle
79renderer.line
80renderer.gradient
81renderer.circle
82renderer.circle_outline
83renderer.triangle
84renderer.world_to_screen
85renderer.indicator
86renderer.texture
87renderer.load_svg
88cvar.set_string
89syntax: cvar.set_string(value)
90value - String value
91Back to TOC
92
93cvar.get_string
94syntax: cvar.get_string()
95Returns nil on failure.
96Back to TOC
97
98cvar.set_float
99syntax: cvar.set_float(value)
100value - Float value
101cvar.cl_interp_ratio:set_float(1)
102Back to TOC
103
104cvar.set_raw_float
105syntax: cvar.set_raw_float(value)
106value - Float value
107This sets the float value without changing the integer and string values.
108Back to TOC
109
110cvar.get_float
111syntax: cvar.get_float()
112Returns nil if called on a ConCommand.
113Back to TOC
114
115cvar.set_int
116syntax: cvar.set_int(value)
117value - Integer value
118Back to TOC
119
120cvar.set_raw_int
121syntax: cvar.set_raw_int(value)
122value - Integer value
123This sets the integer value without changing the float and string values.
124Back to TOC
125
126cvar.get_int
127syntax: cvar.get_int()
128Returns nil if called on a ConCommand.
129Back to TOC
130
131cvar.invoke_callback
132syntax: cvar.invoke_callback()
133For ConCommands, optionally pass extra arguments and they will be forwarded to the callback. For ConVars, optionally pass an extra integer argument specifying the index of the change callback to invoke, otherwise all change callbacks will be invoked.
134cvar.snd_setmixer:invoke_callback("Ambient", "vol", "0") -- equivalent to typing "snd_setmixer Ambient vol 0" in console
135Back to TOC
136
137globals.realtime
138syntax: globals.realtime()
139Returns the local time in seconds.
140Back to TOC
141
142globals.curtime
143syntax: globals.curtime()
144Returns the game time in seconds. This number is synchronized with the server.
145Back to TOC
146
147globals.frametime
148syntax: globals.frametime()
149Returns the number of seconds elapsed during the last game frame.
150Back to TOC
151
152globals.absoluteframetime
153syntax: globals.absoluteframetime()
154Returns the number of seconds elapsed during the last game frame.
155Back to TOC
156
157globals.maxplayers
158syntax: globals.maxplayers()
159Returns the maximum number of players in the server.
160Back to TOC
161
162globals.tickcount
163syntax: globals.tickcount()
164Returns the number of ticks elapsed in the server.
165Back to TOC
166
167globals.tickinterval
168syntax: globals.tickinterval()
169Returns the time elapsed in one game tick in seconds.
170Back to TOC
171
172globals.framecount
173syntax: globals.framecount()
174Returns the number of frames since the game started
175Back to TOC
176
177globals.mapname
178syntax: globals.mapname()
179Returns the name of the loaded map, or nil if you are not in game.
180Back to TOC
181
182globals.lastoutgoingcommand
183syntax: globals.lastoutgoingcommand()
184Returns the command number of the last outgoing command.
185Back to TOC
186
187entity.get_local_player
188syntax: entity.get_local_player()
189Returns the entity index for the local player, or nil on failure.
190Back to TOC
191
192entity.get_all
193syntax: entity.get_all(classname)
194classname - Optional string that specifies the class name of entities that will be added to the list, for example "CCSPlayer".
195Returns an array of entity indices. Pass no arguments for all entities.
196Back to TOC
197
198entity.get_players
199syntax: entity.get_players(enemies_only)
200enemies_only - Optional. If true then you and the players on your team will not be added to the list.
201Returns an array of player entity indices. Dormant and dead players will not be added to the list.
202Back to TOC
203
204entity.get_game_rules
205syntax: entity.get_game_rules()
206Returns entity index of CCSGameRulesProxy instance, or nil if none exists.
207Back to TOC
208
209entity.get_player_resource
210syntax: entity.get_player_resource()
211Returns entity index of CCSPlayerResource instance, or nil if none exists.
212Back to TOC
213
214entity.get_classname
215syntax: entity.get_classname(ent)
216ent - Entity index.
217Returns the name of the entity's class, or nil on failure.
218Back to TOC
219
220entity.set_prop
221syntax: entity.set_prop(ent, propname, value, array_index)
222ent - Entity index.
223propname - Name of the networked property.
224value - The property will be set to this value. For vectors or angles, separate the components by commas.
225array_index - Optional. If propname is an array, the value at this array index will be set.
226Back to TOC
227
228entity.get_prop
229syntax: entity.get_prop(ent, propname, array_index)
230ent - Entity index.
231propname - Name of the networked property.
232array_index - Optional. If propname is an array, the value at this array index will be returned.
233Returns the value of the property, or nil on failure. For vectors or angles, this returns three values.
234Back to TOC
235
236entity.is_enemy
237syntax: entity.is_enemy(ent)
238ent - Entity index.
239Returns true if the entity is on the other team.
240Back to TOC
241
242entity.is_alive
243syntax: entity.is_alive(ent)
244ent - Entity index.
245Returns true if the player is not dead.
246Back to TOC
247
248entity.is_dormant
249syntax: entity.is_dormant(ent)
250ent - Entity index.
251Returns true if the player is not dormant.
252Back to TOC
253
254entity.get_player_name
255syntax: entity.get_player_name(ent)
256ent - Player entity index.
257Returns the player's name, or the string "unknown" on failure.
258Back to TOC
259
260entity.get_player_weapon
261syntax: entity.get_player_weapon(ent)
262ent - Player entity index.
263Returns the entity index of the player's active weapon, or nil if the player is not alive, dormant, etc.
264Back to TOC
265
266entity.hitbox_position
267syntax: entity.hitbox_position(player, hitbox)
268player - Entity index of the player.
269hitbox - Either a string of the hitbox name, or an integer index of the hitbox.
270Returns world coordinates x, y, z, or nil on failure.
271Back to TOC
272
273entity.get_steam64
274syntax: entity.get_steam64(player)
275player - Entity index of the player.
276Returns steamID3, or nil on failure.
277Back to TOC
278
279entity.get_bounding_box
280syntax: entity.get_bounding_box(player)
281player - Entity index of the player.
282Returns x1, y1, x2, y2, alpha_multiplier. The contents of x1, y1, x2, y2 must be ignored when alpha_multiplier is zero, which indicates that the bounding box is invalid and should not be drawn.
283Back to TOC
284
285client.set_event_callback
286syntax: client.set_event_callback(event_name, callback)
287event_name - Name of the event.
288callback - Lua function to call when this event occurs.
289Raises an error and prints a message in console upon failure.
290Back to TOC
291
292client.log
293syntax: client.log(msg, ...)
294msg - The message
295... - Optional comma-separated arguments to concatenate with msg.
296Back to TOC
297
298client.color_log
299syntax: client.color_log(r, g, b, msg, ...)
300r - Red (0-255)
301g - Red (0-255)
302b - Red (0-255)
303msg - The message
304... - Optional comma-separated arguments to concatenate with msg.
305Back to TOC
306
307client.exec
308syntax: client.exec(cmd, ...)
309cmd - The console command(s) to execute.
310... - Optional comma-separated arguments to concatenate with cmd.
311Back to TOC
312
313client.userid_to_entindex
314syntax: client.userid_to_entindex(userid)
315userid - This is given by some game events.
316Returns the entity index, or 0 on failure.
317Back to TOC
318
319client.draw_debug_text
320syntax: client.draw_debug_text(x, y, z, line_offset, duration, r, g, b, a, ...)
321x - Position in world space
322y - Position in world space
323z - Position in world space
324line_offset - Used for vertical alignment, use 0 for the first line.
325duration - Time in seconds that the text will remain on the screen.
326r - Red (1-255)
327g - Green (1-255)
328b - Blue (1-255)
329a - Alpha (1-255)
330... - The text that will be drawn
331Avoid calling this during the paint event.
332Back to TOC
333
334client.draw_hitboxes
335syntax: client.draw_hitboxes(entindex, duration, hitboxes, r, g, b, a, tick)
336entindex - Entity index
337duration - Time in seconds
338hitboxes - Either the hitbox index, an array of hitbox indices, or 19 for all hitboxes
339r - Red (1-255)
340g - Green (1-255)
341b - Blue (1-255)
342a - Alpha (1-255)
343tick - Optional integer
344Draws hitbox overlays. Avoid calling this during the paint event.
345Back to TOC
346
347client.random_int
348syntax: client.random_int(minimum, maximum)
349minimum - Lowest possible result
350maximum - Highest possible result
351Returns a random integer between minimum and maximum.
352Back to TOC
353
354client.random_float
355syntax: client.random_float(minimum, maximum)
356minimum - Lowest possible result
357maximum - Highest possible result
358Returns a random float between minimum and maximum.
359Back to TOC
360
361client.screen_size
362syntax: client.screen_size()
363Returns (width, height).
364Back to TOC
365
366client.visible
367syntax: client.visible(x, y, z)
368x - Position in world space
369y - Position in world space
370z - Position in world space
371Returns true if the position is visible. For example, you could use a player's origin to see if they are visible.
372Back to TOC
373
374client.trace_line
375syntax: client.trace_line(skip_entindex, from_x, from_y, from_z, to_x, to_y, to_z)
376skip_entindex - Ignore this entity while tracing
377from_x - Position in world space
378from_y - Position in world space
379from_z - Position in world space
380to_x - Position in world space
381to_y - Position in world space
382to_z - Position in world space
383Returns fraction, entindex. fraction is a percentage in the range [0.0, 1.0] that tells you how far the trace went before hitting something, so 1.0 means nothing was hit. entindex is the entity index that hit, or -1 if no entity was hit.
384Back to TOC
385
386client.trace_bullet
387syntax: client.trace_bullet(from_player, from_x, from_y, from_z, to_x, to_y, to_z)
388from_player - Entity index of the player whose weapon will be used for this trace
389from_x - Position in world space
390from_y - Position in world space
391from_z - Position in world space
392to_x - Position in world space
393to_y - Position in world space
394to_z - Position in world space
395Returns entindex, damage. Entindex is nil when no player is hit.
396Back to TOC
397
398client.scale_damage
399syntax: client.scale_damage(entindex, hitgroup, damage)
400entindex - Player entity index
401hitgroup - Hit group index
402damage - Damage
403Returns adjusted damage for the specified hitgroup
404Back to TOC
405
406client.delay_call
407syntax: client.delay_call(delay, callback, ...)
408delay - Time in seconds to wait before calling callback.
409callback - The lua function that will be called after delay seconds.
410... - Optional arguments that will be passed to the callback.
411Back to TOC
412
413client.latency
414syntax: client.latency()
415Returns your latency in seconds.
416Back to TOC
417
418client.camera_angles
419syntax: client.camera_angles()
420Returns pitch, yaw, roll of where you are looking.
421Back to TOC
422
423client.camera_angles
424syntax: client.camera_angles(pitch, yaw)
425pitch - Pitch
426yaw - Yaw
427Set camera angles
428Back to TOC
429
430client.timestamp
431syntax: client.timestamp()
432Returns high precision timestamp in milliseconds.
433Back to TOC
434
435client.eye_position
436syntax: client.eye_position()
437Returns x, y, z world coordinates of the local player's eye position, or nil on failure.
438Back to TOC
439
440client.set_clan_tag
441syntax: client.set_clan_tag(...)
442... - The text that will be drawn
443The clan tag is removed if no argument is passed or if it is an empty string. Additional arguments will be concatenated similar to client.log.
444Back to TOC
445
446client.system_time
447syntax: client.system_time()
448Returns hour, minute, seconds, milliseconds.
449local h, m, s, ms = client.system_time()
450Back to TOC
451
452client.reload_active_scripts
453syntax: client.reload_active_scripts()
454Reloads all scripts the following frame.
455Back to TOC
456
457ui.new_checkbox
458syntax: ui.new_checkbox(tab, container, name)
459tab - The name of the tab: AA, RAGE, LEGIT, MISC, PLAYERS, SKINS, or VISUALS.
460container - The name of the existing container to which this control will be added.
461name - The name of the checkbox.
462Returns a special value that can be passed to ui.get and ui.set, or throws an error on failure.
463Back to TOC
464
465ui.new_slider
466syntax: ui.new_slider(tab, container, name, min, max, init_value, show_tooltip, unit, scale, tooltips)
467tab - The name of the tab: AA, RAGE, LEGIT, MISC, PLAYERS, SKINS, or VISUALS.
468container - The name of the existing container to which this control will be added.
469name - The name of the slider.
470min - The minimum value that can be set using the slider.
471max - The maximum value that can be set using the slider.
472init_value - Optional integer. The initial value. If not provided, the initial value will be min.
473show_tooltip - Optional boolean. true if the slider should display its current value.
474unit - Optional string that is two characters or less. This will be appended to the display value. For example, "px" for pixels or "%" for a percentage.
475scale - Optional The display value will be multiplied by this scale. For example, 0.1 will make a slider with the range [0-1800] show as 0.0-180.0 with one decimal place.
476tooltips - Optional table used to override the tooltip for the specified values. The key must be within min-max. The value is a string that will be shown instead of the numeric value whenever that value is selected.
477Returns a special value that can be passed to ui.get and ui.set, or throws an error on failure.
478Back to TOC
479
480ui.new_combobox
481syntax: ui.new_combobox(tab, container, name, ...)
482tab - The name of the tab: AA, RAGE, LEGIT, MISC, PLAYERS, SKINS, or VISUALS.
483container - The name of the existing container to which this control will be added.
484name - The name of the combobox.
485... - One or more comma separated string values that will be added to the combobox. Alternatively, a table of strings that will be added.
486Returns a special value that can be passed to ui.get and ui.set, or throws an error on failure.
487Back to TOC
488
489ui.new_multiselect
490syntax: ui.new_multiselect(tab, container, name, ...)
491tab - The name of the tab: AA, RAGE, LEGIT, MISC, PLAYERS, SKINS, or VISUALS.
492container - The name of the existing container to which this control will be added.
493name - The name of the multiselect.
494... - One or more comma separated string values that will be added to the combobox. Alternatively, a table of strings that will be added.
495Returns a special value that can be passed to ui.get and ui.set, or throws an error on failure.
496Back to TOC
497
498ui.new_hotkey
499syntax: ui.new_hotkey(tab, container, name, inline)
500tab - The name of the tab: AA, RAGE, LEGIT, MISC, PLAYERS, SKINS, or VISUALS.
501container - The name of the existing container to which this control will be added.
502name - The name of the hotkey.
503inline - Optional boolean. If set to true, the hotkey will be placed to the right of the preceding menu item.
504Returns a special value that can be passed to ui.get to see if the hotkey is pressed, or throws an error on failure.
505Back to TOC
506
507ui.new_button
508syntax: ui.new_button(tab, container, name, callback)
509tab - The name of the tab: AA, RAGE, LEGIT, MISC, PLAYERS, SKINS, or VISUALS.
510container - The name of the existing container to which this checkbox will be added.
511name - The name of the button.
512callback - The lua function that will be called when the button is pressed.
513Throws an error on failure. The return value should not be used with ui.set or ui.get.
514Back to TOC
515
516ui.new_color_picker
517syntax: ui.new_color_picker(tab, container, name, r, g, b, a)
518tab - The name of the tab: AA, RAGE, LEGIT, MISC, PLAYERS, SKINS, or VISUALS.
519container - The name of the existing container to which this checkbox will be added.
520name - The name of the color picker. This will not be shown, it is only used to identify this item in saved configs.
521r - Optional initial red value (0-255)
522g - Optional initial green value (0-255)
523b - Optional initial blue value (0-255)
524a - Optional initial alpha value (0-255)
525Throws an error on failure. The color picker is placed to the right of the previous menu item.
526Back to TOC
527
528ui.new_textbox
529syntax: ui.new_textbox(tab, container)
530tab - The name of the tab: AA, RAGE, LEGIT, MISC, PLAYERS, SKINS, or VISUALS.
531container - The name of the existing container to which this textbox will be added.
532Throws an error on failure. Returns a special value that can be used with ui.get
533Back to TOC
534
535ui.reference
536syntax: ui.reference(tab, container, name)
537tab - The name of the tab: AA, RAGE, LEGIT, MISC, PLAYERS, SKINS, or VISUALS.
538container - The name of the existing container to which this checkbox will be added.
539name - The name of the menu item.
540Avoid calling this from inside a function. Returns a reference that can be passed to ui.get and ui.set, or throws an error on failure. This allows you to access a built-in pre-existing menu items. This function returns multiple values when the specified menu item is followed by unnamed menu items, for example a color picker or a hotkey.
541Back to TOC
542
543ui.set
544syntax: ui.set(item, value, ...)
545item - The result of either ui.new_checkbox, ui.new_slider, or ui.reference.
546value - The value to which the menu item will be set.
547... - Optional. For multiselect comboboxes, you may want to set more than one option.
548For checkboxes, pass true or false. For a slider, pass a number that is within the slider's minimum/maximum values. For a combobox, pass a string value. For a multiselect combobox, pass zero or more strings. For referenced buttons, param is ignored and the button's callback is invoked. For color pickers, pass the arguments r, g, b, a.
549Back to TOC
550
551ui.get
552syntax: ui.get(item)
553item - The special value returned by ui.new_checkbox, ui.new_slider, ui.new_combobox, ui.new_hotkey, or ui.reference.
554For a checkbox, returns true or false. For a slider, returns an integer. For a combobox, returns a string. For a multiselect combobox, returns an array of strings. For a hotkey, returns true if the hotkey is active. For a color picker, returns r, g, b, a. Throws an error on failure.
555Back to TOC
556
557ui.set_callback
558syntax: ui.set_callback(item, callback)
559item - The special value returned by ui.new_*. Do not try passing a reference to an existing menu item.
560callback - Lua function that will be called when the menu item changes values. For example, this will be called when the user checks or unchecks a checkbox.
561Back to TOC
562
563ui.set_visible
564syntax: ui.set_visible(item, visible)
565item - A menu item reference.
566visible - Boolean. Pass false to hide the control from the menu.
567Back to TOC
568
569ui.is_menu_open
570syntax: ui.is_menu_open()
571Returns true if the menu is currently open.
572Back to TOC
573
574ui.mouse_position
575syntax: ui.mouse_position()
576Returns current mouse coordinates x, y
577Back to TOC
578
579renderer.text
580syntax: renderer.text(x, y, r, g, b, a, flags, max_width, ...)
581x - Screen coordinate
582y - Screen coordinate
583r - Red (1-255)
584g - Green (1-255)
585b - Blue (1-255)
586a - Alpha (1-255)
587flags - "+" for large text, "-" for small text, "c" for centered text, "r" for right-aligned text, "b" for bold text. "c" can be combined with other flags. nil can be specified for normal sized uncentered text.
588max_width - Text will be clipped if it exceeds this width in pixels. Use 0 for no limit.
589... - Text that will be drawn
590This can only be called from the paint callback.
591Back to TOC
592
593renderer.measure_text
594syntax: renderer.measure_text(flags, ...)
595flags - "+" for large text, "-" for small text, or nil for normal sized text.
596... - Text that will be measured
597Returns width, height. This can only be called from the paint callback.
598Back to TOC
599
600renderer.rectangle
601syntax: renderer.rectangle(x, y, w, h, r, g, b, a)
602x - Screen coordinate
603y - Screen coordinate
604w - Width in pixels
605h - Height in pixels
606r - Red (1-255)
607g - Green (1-255)
608b - Blue (1-255)
609a - Alpha (1-255)
610This can only be called from the paint callback.
611Back to TOC
612
613renderer.line
614syntax: renderer.line(xa, ya, xb, yb, r, g, b, a)
615xa - Screen coordinate of point A
616ya - Screen coordinate of point A
617xb - Screen coordinate of point B
618yb - Screen coordinate of point B
619r - Red (1-255)
620g - Green (1-255)
621b - Blue (1-255)
622a - Alpha (1-255)
623This can only be called from the paint callback.
624Back to TOC
625
626renderer.gradient
627syntax: renderer.gradient(x, y, w, h, r1, g1, b1, a1, r2, g2, b2, a2, ltr)
628x - Screen coordinate
629y - Screen coordinate
630w - Width in pixels
631h - Height in pixels
632r1 - Red (1-255)
633g1 - Green (1-255)
634b1 - Blue (1-255)
635a1 - Alpha (1-255)
636r2 - Red (1-255)
637g2 - Green (1-255)
638b2 - Blue (1-255)
639a2 - Alpha (1-255)
640ltr - Left to right. Pass true for horizontal gradient, or false for vertical.
641This can only be called from the paint callback.
642Back to TOC
643
644renderer.circle
645syntax: renderer.circle(x, y, r, g, b, a, radius, start_degrees, percentage)
646x - Screen coordinate
647y - Screen coordinate
648r - Red (1-255)
649g - Green (1-255)
650b - Blue (1-255)
651a - Alpha (1-255)
652radius - Radius of the circle in pixels.
653start_degrees - 0 is the right side, 90 is the bottom, 180 is the left, 270 is the top.
654percentage - Must be within [0.0-1.0]. 1.0 is a full circle, 0.5 is a half circle, etc.
655This can only be called from the paint callback.
656Back to TOC
657
658renderer.circle_outline
659syntax: renderer.circle_outline(x, y, r, g, b, a, radius, start_degrees, percentage, thickness)
660x - Screen coordinate
661y - Screen coordinate
662r - Red (1-255)
663g - Green (1-255)
664b - Blue (1-255)
665a - Alpha (1-255)
666radius - Radius of the circle in pixels.
667start_degrees - 0 is the right side, 90 is the bottom, 180 is the left, 270 is the top.
668percentage - Must be within [0.0-1.0]. 1.0 is a full circle, 0.5 is a half circle, etc.
669thickness - Thickness of the outline in pixels.
670This can only be called from the paint callback.
671Back to TOC
672
673renderer.triangle
674syntax: renderer.triangle(x0, y0, x1, y1, x2, y2, r, g, b, a)
675x0 - Screen coordinate X for point A
676y0 - Screen coordinate Y for point A
677x1 - Screen coordinate X for point B
678y1 - Screen coordinate Y for point B
679x2 - Screen coordinate X for point C
680y2 - Screen coordinate Y for point C
681r - Red (1-255)
682g - Green (1-255)
683b - Blue (1-255)
684a - Alpha (1-255)
685This can only be called from the paint callback.
686Back to TOC
687
688renderer.world_to_screen
689syntax: renderer.world_to_screen(x, y, z)
690x - Position in world space
691y - Position in world space
692z - Position in world space
693Returns two screen coordinates (x, y), or nil if the world position is not visible on your screen. This can only be called from the paint callback.
694Back to TOC
695
696renderer.indicator
697syntax: renderer.indicator(r, g, b, a, ...)
698r - Red (1-255)
699g - Green (1-255)
700b - Blue (1-255)
701a - Alpha (1-255)
702... - The text that will be drawn
703Returns the Y screen coordinate (vertical offset) of the drawn text, or nil on failure. This can only be called from the paint callback.
704Back to TOC
705
706renderer.texture
707syntax: renderer.texture(id, x, y, w, h, r, g, b, a)
708id - Texture ID
709x - X screen coordinate
710y - Y screen coordinate
711w - Width
712h - Height
713r - Red (0-255)
714g - Green (0-255)
715b - Blue (0-255)
716a - Alpha (0-255)
717Back to TOC
718
719renderer.load_svg
720syntax: renderer.load_svg(contents, width, height)
721contents - SVG file contents
722width - Width
723height - Height
724Returns a texture ID that can be used with renderer.texture, or nil on failure