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