How do I set background images?

Dongers
24 Jan 2022, 17:54

I'm trying to change the background to an image, but I can't find a way to do that. I've read that there's supposed to be a background image option somewhere in the Display tab of Game, but the only thing there is being able to change the colours of the background and the Margin.


mrangel
24 Jan 2022, 20:36

There is a property called backgroundimage, but the control on the Display tab says "Margin image:".

If you mean the actual colour behind the text (which is likely to make the text hard to read if you put anything there), I don't think there's a standard way to do that. You would need to change it in your UI Initialisation script, using a line like:

JS.eval("$('#gameBorder').css(\"background-image: url('" + GetFileURL("imagename.png") + "')\");")

(that's off the top of my head, but I think I got it right)