Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Librairies
- import controlP5.*;
- ControlP5 cP5;
- // boutton accueil
- controlP5.Button aveugle;
- controlP5.Button chat;
- controlP5.Button ancien;
- controlP5.Button drogue;
- controlP5.Button spidercochon;
- float valeur;
- PImage nous;
- color[][] tableaudecouleurs= new color[400][300];
- float rouge;
- float vert;
- float bleu;
- int i=0;
- int j=0;
- int Aveugle=0;
- void setup() {
- background(255);
- size(1300, 900);
- cP5 = new ControlP5(this);
- aveugle=cP5.addButton("aveugle")
- .setPosition(75, 150 )
- .setCaptionLabel("aveugle" )
- .setSize(100, 50)
- .setColorBackground(color(0, 0, 0));
- cP5 = new ControlP5(this);
- aveugle=cP5.addButton("chat")
- .setPosition(250, 150 )
- .setCaptionLabel("chat" )
- .setSize(100, 50)
- .setColorBackground(color(0, 0, 0));
- cP5 = new ControlP5(this);
- aveugle=cP5.addButton("ancien")
- .setPosition(75, 350 )
- .setCaptionLabel("ancien" )
- .setSize(100, 50)
- .setColorBackground(color(0, 0, 0));
- cP5 = new ControlP5(this);
- aveugle=cP5.addButton("drogue")
- .setPosition(250, 350 )
- .setCaptionLabel("drogue" )
- .setSize(100, 50)
- .setColorBackground(color(0, 0, 0));
- cP5 = new ControlP5(this);
- aveugle=cP5.addButton("spidercochon")
- .setPosition(150, 500 )
- .setCaptionLabel("spidercochon" )
- .setSize(100, 50)
- .setColorBackground(color(0, 0, 0));
- nous=loadImage("nous.jpg");
- nous.resize(600, 400); //taille image
- image(nous, 650, 150); //position image
- }
- void draw() {
- fill(155);
- rect(25, 0, 400, 600);
- if (Aveugle==1) {
- //Aveugle();
- }
- fill(255, 0, 0);
- ellipse(350, 50, 50, 50);
- }
- /*void Aveugle() {
- aveugle=1;
- if (nous==1 && aveugle==1) {
- for (int i=0; i<800; i++) {
- for (int j=0; j<800; j++) {
- set(i, j, color(0, 0, 0));
- }
- }
- }
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement