We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Change the color of full screen background
Page Index Toggle Pages: 1
Change the color of full screen background (Read 1990 times)
Change the color of full screen background
Aug 10th, 2009, 8:02am
 
Hi

I apologize in advance if this is actually in the reference somewhere, but I can't find it. My question is, is there anyway to change the background color of the area outside the actual application when exporting as a full screen app? Because as it is now I'm just getting a grey, and I would like for it to be white.

So is there anyway to do this?

I realize that setting size() to the same width and height as my screen will have basically the same effect, but I'm getting some issues with that and then it won't be very portable, so if it is possible to set the "dead zone" background color then that would be great.
Re: Change the color of full screen background
Reply #1 - Aug 10th, 2009, 8:15am
 
I forgot to add that I found a setting called run.present.bgcolor in preferences.txt, which seemed like what I wanted, but changing it to #ffffff doesn't have any effect.
Re: Change the color of full screen background
Reply #2 - Aug 10th, 2009, 8:44am
 
Editing that color in your preferences file should do the trick. Just make sure you edit it when Processing is not running, then boot up Processing after you save the file. This works on my system.
Re: Change the color of full screen background
Reply #3 - Aug 24th, 2009, 6:58am
 
Sorry, I completely forgot to check back here, guess I wasn't very hopeful of a getting a reply.

Anyway, I found out that I was editing the wrong file, I had a preferences.txt in my home folder (on linux) which was actually the correct one to edit, not the one in the processing folder.

So that's some progress, but now I have a new problem, which is that processing keeps overwriting that file and resetting run.present.bgcolor to the default value. This seems to happen pretty much all the time, when you launch processing, when you open a sketch, when you close processing. It just resets.

I've tried changing the permissions on the file so that processing can't modify it (yet still read it) but that just caused a crash of processing on startup.

So, pretty frustrating, and I'm out of ideas...

Maybe it works better on windows, and I guess I can live with having to export my applications from windows.
Re: Change the color of full screen background
Reply #4 - Oct 16th, 2009, 2:12pm
 
easyfit wrote on Aug 24th, 2009, 6:58am:
processing keeps overwriting that file and resetting run.present.bgcolor to the default value. This seems to happen pretty much all the time, when you launch processing, when you open a sketch, when you close processing. It just resets.


I have the same problem, but i'm using Windows Vista  Undecided
Re: Change the color of full screen background
Reply #5 - Oct 16th, 2009, 11:00pm
 
Quote:
void setup() {
  size(400, 300); // always call size first
  // int 0 .. 255
  frame.setBackground(new Color(64, 128, 192));
  // or float 0.0 .. 1.0
  frame.setBackground(new Color(random(1.0), random(1.0), random(1.0)));
}

Re: Change the color of full screen background
Reply #6 - Oct 19th, 2009, 11:19pm
 
thanks frankBerg!
Smiley
Page Index Toggle Pages: 1