PDA

View Full Version : Override background with a color?



Debinani
April 6th, 2021, 15:05
Hey all - I'm looking for a way to override the background of a theme with just a flat color. I had an extension that worked in classic, but it doesn't seem to work in Unity.
Is there an easy way to define the desktop frame to do this, or do I need to create a black PNG and repeat it?

Thanks!

Zacchaeus
April 6th, 2021, 16:00
You'd need to override the colour that's in the current theme you are using - or write and extension to do so (since in most cases you won't be able to access the theme).

Debinani
April 6th, 2021, 16:02
Yes exactly, I'm just trying to figure out the exact syntax do do it since the extension I wrote for Classic didn't port. Anyone have a good link to helpful documentation?

Debinani
April 6th, 2021, 16:19
Resolved. I cracked open the SWADE ruleset and could find no reference to background color, so I created an extension that slapped a small black png up on the screen.

damned
April 6th, 2021, 23:54
Hi Debinani - improve the performance a little and use a big square.

swbuza
April 10th, 2021, 01:14
What happens if you set the background image to zero size?

damned
April 10th, 2021, 03:27
What do you mean to zero size?
If you set it to 1px * 1px it will have to draw it a couple of million times to fill the screen.

swbuza
April 10th, 2021, 15:44
0px, e.g. 0,0,0,0. 1x1 is not zero.

Moon Wizard
April 10th, 2021, 18:03
If the image isn't big enough, I have no idea what would happen. I believe you would either get errors, a crash, or some sort of pink/blue background, or maybe see through to other objects/cameras. It's not something we test for.

Regards,
JPG

swbuza
April 11th, 2021, 03:42
If the image isn't big enough, I have no idea what would happen. I believe you would either get errors, a crash, or some sort of pink/blue background, or maybe see through to other objects/cameras. It's not something we test for.

Regards,
JPG

I actually know the answer. I was just curious to know if just getting a plain blue background was an expected result.

I kind of accidentally discovered this when I moved a theme with a 1920x1080 background to a 2560x1440 monitor and it left a blue background surrounding the image. So then I set the image to half size and it got smaller but left a bigger blue background. So for giggles I tried a zero size and it just gave me the blue background with no image.