how to make a full screen option
in
Programming Questions
•
2 months ago
Hi,
is there a way currently to incorporate a full screen option in a sketch ?
- I saw that the library full screen is "semi-dead".
- I saw this wiki :
but *sketch>present* don't work on my machine (win7, processing 2.0.1) : it display the initial sketch at the center, and a piece of grey rectangne at the top left corner. idem with
I try with :
- size(displayWidth, displayHeight);
it give me a sketch at the dimension of my screen but i didn't manage to switch between 2 size e.g this don't work :
And like the purpose is for the web, I try to export with processing.js but its looks like the variable displayWidth and displayHeight doesn't work. (I try to display them in a text(); ). idem with : ** size(displayWidth, displayHeight);** it don't give a big sketch. (tried with firefox & chrome).
- void setup(){
- size(400, 400);
- background(0);
- text("press a key to full screen", width/2, height/2);
- }
- void draw(){
- }
- void keyPressed(){
- size(displayWidth, displayHeight);
- background(0);
- text("full screen on", width/2, height/2);
- }
thanks
1