Page 1 sur 1

Gestion des boutons d'un WaitWindowEvent

Publié : mar. 23/août/2022 17:06
par SPH
Salut,

Je cherche à rendre les boutons "Ok", "Cancel" et "Visiter le site" mais je patauge ... :oops:
Pouvez vous, s'il vous plait, apporter votre aimable contribution ?

Merci beaucoup :D

Code : Tout sélectionner

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Scrab buy ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; SPH 2022 - PB6.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;é

InitKeyboard()
InitSprite()

OpenWindow(0, 0, 0, 320, 240, "Scrab Buy", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 1, 1)
;Image.i = CatchImage(#PB_Any, ?titre_bmp_start)
;ImageGadget(0,  10, 10, 300, 109, ImageID(image.i))                      ; imagegadget standard

    TextGadget(1,12,132,330,15,"Veuillez entrer votre clé privée.")
    StringGadget(4,12,152,174,20,def$,flags)
    ButtonGadget(5,192,150,56,23,"OK")
    ButtonGadget(6,252,150,56,23,"Cancel")
    
    TextGadget(2,12,186,330,15,"Si vous n'avez pas de clé, veuillez en acheter une ici :")
    ButtonGadget(3,12,206,298,23,"hexascrabble.com")
    
;;;;; A partir d'ici, tout est à faire. Et comme je suis un newbie, je demande votre aide...    
    Repeat
      ev=WaitWindowEvent()
      
      id=EventGadget()
      esc=GetAsyncKeyState_(#VK_ESCAPE)
      SetActiveGadget(4) : MessageBeep_(#MB_ICONQUESTION)
    Until esc<>0 Or ev=#PB_Event_CloseWindow
    
    If esc<>0 Or id=6 Or ev=#PB_Event_CloseWindow
      End
    EndIf
    
    If id=5 Or ret<>0
      macle$=GetGadgetText(4)
    Else
      macle$=""
    EndIf


Debug macle$

End

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Re: Gestion des boutons d'un WaitWindowEvent

Publié : mar. 23/août/2022 18:15
par manababel
bonjour
j'ai regardé dans les exemples de PB et voici ce que j'ai trouvé .
je ne comprends pas pourquoi t'as version ne marche pas.
Espérons que quelqu'un pourra nous l'expliquer

Code : Tout sélectionner

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Scrab buy ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; SPH 2022 - PB6.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;é

InitKeyboard()
InitSprite()

OpenWindow(0, 0, 0, 320, 240, "Scrab Buy", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 1, 1)
;Image.i = CatchImage(#PB_Any, ?titre_bmp_start)
;ImageGadget(0,  10, 10, 300, 109, ImageID(image.i))                      ; imagegadget standard

    TextGadget(1,12,132,330,15,"Veuillez entrer votre clé privée.")
    StringGadget(4,12,152,174,20,def$,flags)
    ButtonGadget(5,192,150,56,23,"OK")
    ButtonGadget(6,252,150,56,23,"Cancel")
    
    TextGadget(2,12,186,330,15,"Si vous n'avez pas de clé, veuillez en acheter une ici :")
    ButtonGadget(3,12,206,298,23,"hexascrabble.com")
    
    ;;;;; A partir d'ici, tout est à faire. Et comme je suis un newbie, je demande votre aide...    
    Repeat
      Repeat
        Event = WindowEvent()
        Select Event 
          Case #PB_Event_Gadget
            If EventGadget() = 0
              End
            EndIf
            
          Case #PB_Event_CloseWindow
            End 
        EndSelect
      Until Event = 0
      
      Delay(1)
    ForEver
  
    If esc<>0 Or id=6 Or ev=#PB_Event_CloseWindow
      End
    EndIf
    
    If id=5 Or ret<>0
      macle$=GetGadgetText(4)
    Else
      macle$=""
    EndIf


Debug macle$

End

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Re: Gestion des boutons d'un WaitWindowEvent

Publié : mar. 23/août/2022 19:58
par Ollivier
C'est sûrement le SetActiveGadget(4) qui pompe les "ressources" de Windows : il faudrait l'utiliser avec plus de parcimonie, l'exécuter sous condition, uniquement si nécessaire.

Re: Gestion des boutons d'un WaitWindowEvent

Publié : mar. 23/août/2022 19:58
par SPH
Merci d'avance manababel.

Je regarde ça en détail ce soir ou demain. :wink: :!:

Re: Gestion des boutons d'un WaitWindowEvent

Publié : mar. 23/août/2022 20:21
par SPH
J'ai deux questions :

1> Comment, concrètement, gérer les boutons OK et CANCEL ?
2> Y a t'il dans PB un meilleur bouton que celui que j'ai choisi pour envoyer un utilisateur sur un site ?

Merci à vous 2 (et aux autres) 🤩

Re: Gestion des boutons d'un WaitWindowEvent

Publié : mer. 24/août/2022 0:26
par Ollivier
Déjà, HyperlinkGadget pour faire un bouton de lien.

Ensuite, pour les boutons Ok et Annuler, tu as deux méthodes :
- la méthode directe
- la méthode "objet"

La méthode directe. Tu fourres tout ce dont tu as besoin de gérer dans ta boucles principale :

Code : Tout sélectionner

Repeat
 Ev = WaitWindowEvent()
 If Ev = #PB_Event_Gadget
 Select EventGadget()
  Case 5
   Debug "Ok"
  Case 6
    Debug "Annuler"
 EndSelect
 EndIf
Until Ev = #PB_Event_CloseWindow
Moi, j'aime bien. C'est bourrin, ça marche à tous les coups. Par contre, il vaut mieux partitionner en procédures s'il y a plus de 5 ou 6 gadgets sinon c'est un gros bordel.


La méthode "objet". Apparue il y a 8 ans, ça permet d'attribuer une procédure à un événement, et, pourquoi pas à un gadget. La boucle principale reste succinte, et tout est préparé à l'avance avec BindEvent() et/ou BindGadgetEvent(). On peut délier temporairement avec UnbindEvent() et UnbindGadgetEvent().

better view

Publié : mer. 24/août/2022 1:08
par nemerod
essais de ne pas faire trop de procedure pour si peu de chose, meme quant tu arrive avec plus de 20 Gadget

Code : Tout sélectionner

Enumeration
  #TEX_S1
  #TEX_S2
  #BTN_OK
  #EDT_KEY
  #BTN_LINK
  #BTN_CANCEL
EndEnumeration

OpenWindow(0,0,0,320,240,"Scrab Buy",#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered)
TextGadget(  #TEX_S1    , 12,132,330, 15,"Veuillez entrer votre clé privée.")
TextGadget(  #TEX_S2    , 12,186,330, 15,"Si vous n'avez pas de clé, veuillez en acheter une ici :")
StringGadget(#EDT_KEY   , 12,152,174, 20,"")
ButtonGadget(#BTN_OK    ,192,150, 56, 23,"OK")
ButtonGadget(#BTN_CANCEL,252,150, 56, 23,"Cancel")
ButtonGadget(#BTN_LINK  , 12,206,298, 23,"hexascrabble.com")
Repeat
  eee=WaitWindowEvent()
  Select eee
    Case $0:Delay(10);no event; render allowed
      
    Case #PB_Event_Gadget:
      If EventType()=#PB_EventType_LeftClick
        Select EventGadget()
          Case #BTN_CANCEL:eee=#PB_Event_CloseWindow
          Case #BTN_OK    :
            t$=GetGadgetText(#EDT_KEY):If Len(t$)>0
              ;check de la clef si valide ici
              
            EndIf
          Case #BTN_LINK  :RunProgram("http://hexascrabble.com/")
        EndSelect
      EndIf
    Default
  EndSelect
Until eee=#PB_Event_CloseWindow
End

Re: Gestion des boutons d'un WaitWindowEvent

Publié : mer. 24/août/2022 6:57
par SPH
Une version de Wog :

Code : Tout sélectionner

Enumeration 1
  #Window_Main
EndEnumeration

Enumeration 1
  #Gadget_Main_txt1
  #Gadget_Main_def
  #Gadget_Main_Ok
  #Gadget_Main_Cancel
  #Gadget_Main_txt2
  #Gadget_Main_Link
  #Key_ESC
EndEnumeration

Procedure.i Window_Main()
  If OpenWindow(#Window_Main,0,0,320,240,"Scrab Buy",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
      TextGadget(#Gadget_Main_txt1,12,132,330,15,"Veuillez entrer votre clé privée.")
      StringGadget(#Gadget_Main_def,12,152,174,20,"")
      ButtonGadget(#Gadget_Main_Ok,192,150,56,23,"OK")
      ButtonGadget(#Gadget_Main_Cancel,252,150,56,23,"Cancel")
      TextGadget(#Gadget_Main_txt2,12,185,330,15,"Si vous n'avez pas de clé, veuillez en acheter une ici :")
      ButtonGadget(#Gadget_Main_Link,12,206,298,23,"hexascrabble.com")
    ProcedureReturn WindowID(#Window_Main)
  EndIf
EndProcedure


If Window_Main()
  AddKeyboardShortcut(#Window_Main,#PB_Shortcut_Escape,#Key_ESC)
  
  Define quitMain=0
  Repeat
    EventID  =WaitWindowEvent()
    MenuID   =EventMenu()
    GadgetID =EventGadget()
    WindowID =EventWindow()

    Select EventID
      Case #PB_Event_CloseWindow
        Select WindowID
          Case #Window_Main
            quitMain=1
        EndSelect

      Case #PB_Event_Menu
        Select MenuID
          Case #Key_ESC
            quitMain=1
        EndSelect
        
      
      Case #PB_Event_Gadget
        Select GadgetID
          Case #Gadget_Main_Ok
            macle$=GetGadgetText(#Gadget_Main_def)
            Debug macle$
            
          Case #Gadget_Main_Cancel
            quitMain=1
            
          Case #Gadget_Main_Link
            RunProgram("http://"+GetGadgetText(#Gadget_Main_Link))
        EndSelect

    EndSelect
  Until quitMain
  CloseWindow(#Window_Main)
EndIf

Re: Gestion des boutons d'un WaitWindowEvent

Publié : mer. 24/août/2022 7:00
par SPH
Grand merci a vous tous. Vous me sauvez la vie :!: :wink:

Re: Gestion des boutons d'un WaitWindowEvent

Publié : mer. 24/août/2022 20:40
par nemerod
coucou, je sais que sa fais un peu copy/paste
mais voila, petit video de se que j'ai fais pour toi
video en question VIDEO_FROM_DISCORD
preview du bordel, le logo a eu le temps de tourné un peu
Image

je sais que le background est raté mais je savais pas quoi mettre pour mettre en évidence le reste :)


amuse toi bien :)
le pour le string pour le code, tu peu facilement l'édité via une variable

Code: Select all

code$
que je tes mise a disposition, tu a juste a faire le input comme bon te semble

Code : Tout sélectionner

#hexa_titre$="Hexascrabble Activator"
Global eee,tin.q,*mmm,foc,code$
*mmm=AllocateMemory($400)
Procedure.q timer(i);TIMER to flag
  !label_timer_loop:
  ;Delay(i);minimal timer delay
  Sleep_(i)
  !mov byte [v_tin],$ff
  !cmp qword[v_eee],$10200
  !jnz label_timer_loop
EndProcedure:CreateThread(@timer(),16)
Procedure.q pmb(X,Y,LX,LY);HITBOX
  !mov rax,[v_gmx]
  !mov rbx,[v_gmy]
  !sub rax,[p.v_X]
  !sub rbx,[p.v_Y]
  !mov rcx,[p.v_LX]
  !mov rdx,[p.v_LY]
  !sub rcx,rax
  !sub rdx,rbx
  !dec rcx
  !dec rdx
  !or  rcx,rdx
  !or  rcx,rbx
  !or  rcx,rax
  !sar rcx,31
  !shl ebx,16
  !mov rax,rcx
  !inc rax
  ProcedureReturn
EndProcedure
OpenWindow(0,0,0,322,266,#hexa_titre$,#PB_Window_BorderLess|#PB_Window_ScreenCentered):CanvasGadget(0,1,1,320,264)
For a = 0 To 63:PokeU(*mmm+$100+(a<<1),Random(2000)   ):PokeU(*mmm+$200+(a<<1),Random(280)-40):Next
CreateImage(0,320,264,32,$ff000000)
Repeat:eee=WindowEvent()
  If foc
    ResizeWindow(0,DesktopMouseX()-wmx,DesktopMouseY()-wmy,#PB_Ignore,#PB_Ignore)
  Else
    gmx=(DesktopMouseX()-WindowX(0,1))+1
    gmy=(DesktopMouseY()-WindowY(0,1))+1
  EndIf
  Select eee
    Case $000
      If tin&$1:tin!$1;flag to allowed render
        HDC=StartDrawing(CanvasOutput(0));variable HDC required
        If HDC:DrawingMode($11):DrawImage(ImageID(0),0,0):Box(0,24,320,240,$08000000)
          
          ;BACKGROUND_HERE
          Circle(400,350,300,$08203050);replace me
          Circle(400,400,300,$10203050);replace me
          
          ;BACKGROUNF_HEADER
          Box(0,0,320,24,$ff000000)
          GrabDrawingImage(0,-2,-2,324,268):DrawAlphaImage(ImageID(0),-3,-3,$80):DrawAlphaImage(ImageID(0),-3,-1,$60)
          For a = 0 To 63:temp=PeekW(*mmm+$100+(a<<1))-1:If temp<30:temp=1600+Random(100):PokeU(*mmm+$200+(a<<1),Random(280)-40):EndIf:Circle(temp>>2,PeekU(*mmm+$200+(a<<1)),3,$20001020):PokeU(*mmm+$100+(a<<1),temp):Next
          Box(0,0,320,24,$ffffffff)
          ;LOGO_HEXA
          mrot.f+0.4:If mrot>30:mrot-60:EndIf
          ccc=$FF404040:temp=0:For a = 0 To 5:PokeL(*mmm+temp,(Sin(Radian((a*60)+mrot))*65)+80):temp+4:PokeL(*mmm+temp,(Cos(Radian((a*60)+mrot))*65)+80):temp+4:Next:SetDCBrushColor_(HDC,ccc&$ffffff):SelectObject_(HDC,GetStockObject_(#DC_BRUSH)):SetDCPenColor_(  HDC,ccc&$ffffff):SelectObject_(HDC,GetStockObject_(#DC_PEN  )):SetPolyFillMode_(HDC,#WINDING):Polygon_(HDC,*mmm,6)
          ccc=$FF00C3E5:temp=0:For a = 2 To 5:PokeL(*mmm+temp,(Sin(Radian((a*60)+mrot))*62)+80):temp+4:PokeL(*mmm+temp,(Cos(Radian((a*60)+mrot))*62)+80):temp+4:Next:SetDCBrushColor_(HDC,ccc&$ffffff):SelectObject_(HDC,GetStockObject_(#DC_BRUSH)):SetDCPenColor_(  HDC,ccc&$ffffff):SelectObject_(HDC,GetStockObject_(#DC_PEN  )):SetPolyFillMode_(HDC,#WINDING):Polygon_(HDC,*mmm,4)
          ccc=$FF007CAF:temp=0:For a = 5 To 8:PokeL(*mmm+temp,(Sin(Radian((a*60)+mrot))*62)+80):temp+4:PokeL(*mmm+temp,(Cos(Radian((a*60)+mrot))*62)+80):temp+4:Next:SetDCBrushColor_(HDC,ccc&$ffffff):SelectObject_(HDC,GetStockObject_(#DC_BRUSH)):SetDCPenColor_(  HDC,ccc&$ffffff):SelectObject_(HDC,GetStockObject_(#DC_PEN  )):SetPolyFillMode_(HDC,#WINDING):Polygon_(HDC,*mmm,4)
          ccc=$FF00A3F5:temp=0:For a = 0 To 5:PokeL(*mmm+temp,(Sin(Radian((a*60)+mrot))*55)+80):temp+4:PokeL(*mmm+temp,(Cos(Radian((a*60)+mrot))*55)+80):temp+4:Next:SetDCBrushColor_(HDC,ccc&$ffffff):SelectObject_(HDC,GetStockObject_(#DC_BRUSH)):SetDCPenColor_(  HDC,ccc&$ffffff):SelectObject_(HDC,GetStockObject_(#DC_PEN  )):SetPolyFillMode_(HDC,#WINDING):Polygon_(HDC,*mmm,6)
          ;SUB_LOGO
          DrawingMode($10):temp=0:For x = 0 To 64:For y = 0 To 77:Plot(x+54,y+43,(PeekA(?lo+temp)!$ff)<<24):temp+1:Next:Next:GrabDrawingImage(0,0,0,320,264)
          ;STRING_CODE
          DrawingMode($11):Box( 12,152,174, 24,$ffffffff):DrawText( 18,152+(12-(TextHeight(code$)>>1)),code$,$ff000000)
          ;BUTTON OK
          If pmb(192,152, 56, 24):Box(192,152, 56, 24,$ff90e090):Else:Box(192,152, 56, 24,$ff809080):EndIf:Box(192,152,  1, 24,$40ffffff):Box(192,152, 56,  1,$60ffffff):Box(247,152,  1, 24,$40000000):Box(192,175, 56,  1,$60000000)
          DrawText(192+(28-(TextWidth("Ok")>>1)),152+(12-(TextHeight("OK")>>1)),"Ok",$ff000000)
          ;BUTTON CANCEL
          If pmb(252,152, 56, 24):Box(252,152, 56, 24,$ff8080d0):Else:Box(252,152, 56, 24,$ff707080):EndIf:Box(252,152,  1, 24,$40ffffff):Box(252,152, 56,  1,$60ffffff):Box(307,152,  1, 24,$40000000):Box(252,175, 56,  1,$60000000)
          DrawText(252+(28-(TextWidth("Annuler")>>1)),152+(12-(TextHeight("Annuler")>>1)),"Annuler",$ff000000)
          ;BUTTON WEBPAGE
          If pmb( 12,206,298, 24):Box( 12,206,298, 24,$ffd0d0d0):Else:Box( 12,206,298, 24,$ff909090):EndIf:Box( 12,206,  1, 24,$40ffffff):Box( 12,206,298,  1,$60ffffff):Box(309,206,  1, 24,$40000000):Box( 12,229,298,  1,$60000000)
          DrawText(12+(149-(TextWidth("hexascrabble.com")>>1)),206+(12-(TextHeight("hexascrabble.com")>>1)),"hexascrabble.com",$ff000000)
          
          ;TOP HEADER
          If pmb(298,0,24,24)
            For a = 2 To 16
              Box(320-a-2,   a,2,2,$800000ff)
              Box(320-a-2,18-a,2,2,$800000ff)
            Next
          Else
            For a = 2 To 16
              Box(320-a-2,   a,2,2,$80000000)
              Box(320-a-2,18-a,2,2,$80000000)
            Next
          EndIf
          DrawingMode($11)
          DrawText(25,12-(TextHeight(#hexa_titre$)>>1),#hexa_titre$,$ff000000,$ff000000)
          StopDrawing()
        EndIf
      Else:Delay(10)
      EndIf
    Case $202
      !mov byte[v_foc],$00
    Case $201,$203
      If pmb(298,0,24,24):eee=#PB_Event_CloseWindow
      Else
        If pmb(0,0,320,24)
          wmx=gmx-1:wmy=gmy-1
          !mov byte[v_foc],$ff
        Else
          If pmb(192,152, 56, 24);OK
            ;use variable code$
          EndIf
          If pmb(252,152, 56, 24);CANCEL
            eee=#PB_Event_CloseWindow
          EndIf
          If pmb( 12,206,298, 24);WEBSITE FOR BUY
            RunProgram("http://hexascrabble.com/?url=buy")
          EndIf
        EndIf
      EndIf
    Default
  EndSelect
Until eee=#PB_Event_CloseWindow:eee=$10200:Delay(100)
End
DataSection
  lo: :Data.a $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$DD,$BB,$BB,$BB,$BB,$BB,$77,$77,$77,$DD,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$DD,$BB,$BB,$BB,$BB,$BB,$77,$77,$77,$77,$77,$55,$33,$33,$33,$33,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$BB,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$CC,$BB,$BB,$BB,$BB,$AA,$77,$77,$77,$77,$77,$55,$33,$33,$33,$33,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$88,$FF,$FF,$FF,$DD,$BB,$BB,$BB,$AA,$77,$77,$77,$77,$77,$44,$33,$33,$33,$33,$22,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$66,$FF,$FF,$FF,$55,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$33,$FF,$FF,$FF,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$22,$FF,$FF,$FF,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$BB,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$99,$FF,$DD,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$77,$FF,$BB,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$44,$FF,$BB,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$22,$FF,$77,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$99,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$CC,$FF,$FF,$FF,$FF,$EE,$BB,$BB,$BB,$99,$77,$77,$77,$44,$33,$33,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$BB,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$BB,$BB,$BB,$AA,$77,$77,$22,$00,$00,$00,$22,$33,$33,$22,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$77,$FF,$FF,$FF,$FF,$FF,$FF,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,$FF,$FF,$FF,$FF,$FF,$33,$00,$00,$00,$33,$FF,$FF,$FF,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$33,$33,$33,$55,$77,$77,$77,$BB,$BB,$BB,$DD,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$33,$00,$00,$00,$11,$FF,$FF,$FF,$22,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$BB,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$33,$00,$00,$00,$00,$FF,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$BB,$FF,$FF,$FF,$BB,$BB,$BB,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$33,$00,$00,$00,$00,$FF,$FF,$EE,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$22,$33,$33,$33,$33,$33,$33,$33,$33,$44,$77,$77,$77,$77,$22,$00,$00,$00,$00,$EE,$FF,$BB,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$33,$FF,$FF,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$33,$FF,$FF,$FF,$FF,$22,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$33,$FF,$FF,$FF,$FF,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$33,$FF,$FF,$FF,$FF,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$77,$FF,$FF,$FF,$FF,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$33,$33,$55,$77,$77,$AA,$BB,$BB,$BB,$BB,$BB,$77,$77,$33,$11,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$77,$FF,$FF,$FF,$FF,$33,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$22,$33,$33,$66,$77,$88,$BB,$BB,$EE,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$AA,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$77,$FF,$FF,$FF,$FF,$33,$00,$00,$00,$00,$00,$00,$22,$33,$44,$77,$77,$AA,$BB,$BB,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$EE,$11,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$55,$77,$55,$33,$22,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$77,$FF,$FF,$FF,$FF,$99,$77,$BB,$BB,$DD,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$55,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$22,$EE,$FF,$FF,$FF,$FF,$FF,$BB,$BB,$88,$77,$55,$33,$22,$00,$00,$00,$00,$77,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,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,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$EE,$BB,$BB,$DD,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$EE,$BB,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
EndDataSection

Re: Gestion des boutons d'un WaitWindowEvent

Publié : mer. 24/août/2022 21:28
par SPH
Intéressant. J'aime la zik dans la vidéo.

J'espère que tu n'as pas gaspillé ton temps car j'avais déja codé de mon coté...

Re: Gestion des boutons d'un WaitWindowEvent

Publié : mer. 24/août/2022 22:45
par Ar-S
Sympa nemerod

@SPH. Même si t'as déjà codé, l'important est de piger.
L'exemple de la doc d'OpenWindowedScreen te montre bien ou placer tes gadgets et leur traitement
J'ai modifié l'exemple pour que tu piges. J'espère que ça t'aidera.

Code : Tout sélectionner

If InitSprite() = 0
    MessageRequester("Erreur", "Impossible d'ouvrir l'écran & l'environnement nécessaire aux sprites !", 0)
    End
  EndIf
  
  If OpenWindow(0, 0, 0, 220, 160, "Un écran dans une fenêtre...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ButtonGadget(1, 170, 135, 45, 20, "Quitter")
    ButtonGadget(3, 170, 114, 45, 20, "OK")
    StringGadget(2,170,90,45,20,"clé")
    
    
    If OpenWindowedScreen(WindowID(0), 0, 0, 160, 160)
      CreateSprite(0, 20, 20)
      If StartDrawing(SpriteOutput(0))
        Box(0, 0, 20, 20, RGB(255, 0, 155))
        StopDrawing()
      EndIf
    Else
      MessageRequester("Erreur", "Impossible d'ouvrir un écran dans la fenêtre!", 0)
      End
    EndIf
  EndIf
  
  direction = 2
  ; BOUCLE PRINCIPALE QUI GERE LA 2D
  Repeat
    ; Il est très important de traiter tous les évènements restants dans la file d'attente à chaque tour
    FlipBuffers() 
    ClearScreen(RGB(0, 0, 0))
    DisplaySprite(0, x, x)
    x + direction
    If x > 140 : direction = -2 : EndIf
    If x < 0   : direction =  2 : EndIf
    Delay(1)
    
    ; BOUCLE 2 QUI GERE TES EVENTS FENETRéS
    Repeat
      Ev = WindowEvent()
      Eg = EventGadget()
      
      Select Ev 
          Case #PB_Event_Gadget
              Select eg
                  Case 1   ; SI UN EVENEMENT SUR LE GADGET 1 SE PRODUIT ALORS...
                      End   
                      
                  Case 3 ;
                      macle$ = GetGadgetText(2)
                      If Len(macle$) > 0   And macle$ <> "clé" 
                          Debug "OK : clé = "+ macle$
                      Else
                          Debug "Aucune clé"    
                      EndIf
                                           
              EndSelect
              
      
        Case #PB_Event_CloseWindow
          End 
      EndSelect
    Until Event = 0
  
    
  ForEver ; FIN BOUCLE PRINCIPALE

Re: Gestion des boutons d'un WaitWindowEvent

Publié : mer. 24/août/2022 23:26
par Ollivier
Il y a un problème de sécurité sur cette page. Quelquechose qui fait freezer mon explorateur tandis que mes autres sites de visite habituels restent complètement indifférents. Quelqu'un peut-il vérifier si la pub en bas de page n'a pas un trojan ?