add render image string capability

This commit is contained in:
John Alanbrook 2024-09-11 12:25:42 -05:00
parent e3029994f9
commit 41c76e1a70

View file

@ -779,6 +779,9 @@ render.text = function(str, pos, size = 1, color = Color.white, wrap = -1, ancho
}; };
render.image = function(tex, pos, scale = [tex.width, tex.height], rotation = 0, color = Color.white) { render.image = function(tex, pos, scale = [tex.width, tex.height], rotation = 0, color = Color.white) {
if (typeof tex === 'string')
tex = game.texture(tex);
if (!tex) return;
flush(); flush();
var t = os.make_transform(); var t = os.make_transform();
t.pos = pos; t.pos = pos;