Game border colour

Silver
The game border colour is set default to white. It's possible to overlay an image with SetBackgroundImage but is there a function that just changes its colour? I've looked down the list of functions and nothing seems obvious so I guess there isn't. Changing it with html/css won't help either as I'm trying to avoid a clearscreen from deleting it.

Silver
I suppose a solution would be to just create a small square of the colour and let it tile with SetBackgroundImage although when I tried that the tiling was obvious. Maybe I'd added too much compression so should export it with less or as a png or something.

Pertex
You could add a Javascript function like this

function SetBackgroundCol(col) {
$("body").css("background-color", col);
}


and call it within the function InitUserInterface with
JS.SetBackgroundCol ("black")

Silver
Oooh, cheers.

Silver
Would that clash with SetBackgroundImage at all though? Or would the image always be overlayed?

Pertex
the image seems to be stronger :)

Silver
Ah cool. If it boiled down to that I'd just call the js as and when needed but that's great that I can basically default to it by calling it once from inituserinterface.

Silver
This works and it persists beyond a ClearScreen and jquery shenanigans even when not called from inituserinterface. You get a bonus prize for guessing the right colour too.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums