NSI - Loïs
scene =1
def setup():
size(1440, 780)
# The image file must be in the data folder of the current sketch
# to load successfully
global img
global img2
global img3
global img4
global img5
global img6
img = loadImage("Scene_0.jpeg") # Load the image into the program
img2 = loadImage("Scene_1.jpg") # Load the image into the program
#img3= loadImage("scene2.jpg")
#img4= loadImage("scene3.jpg")
#img5= loadImage("scene4.jpg")
#img6= loadImage("scene5.png")
#printArray(PFont.list())
f = createFont("Corbel", 20)
textFont(f)
frameRate(7)
def draw():
# Displays the image at its actual size at point (0,0)
#print(mouseY)
global scene
if scene==1:
accueil()
if (mousePressed == True):
if (mouseButton == LEFT):
if mouseX<750:
if mouseX>600:
if mouseY<650:
if mouseY>600:
scene +=1
print(scene)
if scene ==2:
scene_2()
def accueil():
img.resize(1440,780)
image(img, 0,0)
noStroke();
fill(255,255,255,127)
rect(650,600,100,50);
textSize(25)
fill(0)
text("Jouer",665,630)
stroke(255,204,51);
fill(0,0,255)
textSize(100)
text("Pokemon : Trainer Contest",120,200);
def scene_2():
scene=2
fill(255)
rect(0,0,1440,780)
image(img2, 0,0,1440,780)
img2.resize(1440,780)
textSize(50)
fill(255, 255, 0)
text("Duel",665,423)