gros problemes!
Publié : lun. 24/oct./2005 13:37
j'ai un probleme je voulai representer deux boites de text
et un bouton "ok" et un carre bleu. Dans les boites de text on inscrit
deux chiffres puis quand on appuie sur ok ils deviennent les
emplacements x, y et que le carre s'y trouve.
voici le code que j'utilise et il ne marche pas comment faire pour qu'il marche?
et un bouton "ok" et un carre bleu. Dans les boites de text on inscrit
deux chiffres puis quand on appuie sur ok ils deviennent les
emplacements x, y et que le carre s'y trouve.
voici le code que j'utilise et il ne marche pas comment faire pour qu'il marche?
Code : Tout sélectionner
OpenWindow(0,0,0,500,500,#PB_Window_SystemMenu,"test")
CreateGadgetList(WindowID(0))
StringGadget(1,100,100,100,50,"")
StringGadget(2,225,100,100,50,"")
ButtonGadget(3,350,100,100,50,"OK")
Repeat
Select EventGadgetID()
Case 3
Val(x) = Val(GetGadgetText(1))
Val(y) = Val(GetGadgetText(2))
EndSelect
If StartDrawing(WindowOutput())
Box(x,y,50,50,RGB(0,0,250))
StopDrawing()
EndIf
Until WaitWindowEvent()=#PB_Event_CloseWindow