Centrage de fenetre

bigsmokedu58 -  
jjsteing Messages postés 1803 Statut Contributeur -
Bonjour,
voila je vsui un debutant en progrmation et je veus faire un jeu video simple mais je n'arive pas a center la fenetre du jeu
je suis sous just basic
voici le code en question
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
upperLeftY=int((DisplayHeight-WindowHeight)/2)

pouvez vous m'aidez??
A voir également:

2 réponses

bigsmokedu58
 
alors personne???
0
jjsteing Messages postés 1803 Statut Contributeur 181
 
NOMAINWIN
WindowWidth=300
WindowHeight=100
UpperLeftX=INT((DisplayWidth-WindowWidth)/2)
UpperLeftY=INT((DisplayHeight-WindowHeight)/2)

BUTTON #1.btn, "CLOSE", [quit], LL, 120, 10, 60, 30

OPEN "My First GUI" FOR WINDOW AS #1
PRINT #1, "trapclose [quit]"

WAIT
[quit]
CLOSE #1
END
0