Code : Tout sélectionner
#Item_Bouton1 = $FF0000
#Item_Bouton2 = $FF00FF
Enumeration 1
#Image_Item
#Image_Normal
#Image_Selected
#Image_Disable
EndEnumeration
CreateImage(#Image_Item, 200, 200, 32)
StartDrawing(ImageOutput(#Image_Item))
Box(0, 0, 200, 200, $000000)
Box(50, 50, 50, 50, #Item_Bouton2)
Box(50, 100, 50, 20, #Item_Bouton1)
StopDrawing()
CreateImage(#Image_Normal, 200, 200, 32)
StartDrawing(ImageOutput(#Image_Normal))
Box(0, 0, 200, 200, $FFFFFF)
Box(50, 100, 50, 20, $00FF00)
Box(25, 120, 100, 50, $0000FF)
StopDrawing()
CreateImage(#Image_Disable, 200, 200, 32)
StartDrawing(ImageOutput(#Image_Disable))
Box(0, 0, 200, 200, $FFFFFF)
Box(50, 100, 50, 20, $00FF00)
Box(25, 120, 100, 50, $0000FF)
StopDrawing()
CreateImage(#Image_Selected, 200, 200, 32)
StartDrawing(ImageOutput(#Image_Selected))
Box(0, 0, 200, 200, $FFFFFF)
Box(50, 50, 50, 50, $FF0000)
Box(50, 100, 50, 20, $FF0000)
Box(25, 120, 100, 50, $0000FF)
StopDrawing()
If CreateSkinWindow(0, 0, 0, "SkinWindow", #PB_Window_ScreenCentered, 0, #Image_Normal, 0, #Image_Selected, 0, #Image_Disable, #Image_Item, 0, 0, 0)
LinkSkinItem(#Item_Bouton1, #Item_Bouton2)
SkinItemMoveWindow(#Item_Bouton2, 1)
Repeat
Event = WaitSkinWindowEvent()
Select EventSkinItem()
Case #Item_Bouton1
If GetSkinItemState(#Item_Bouton1)
SetSkinItemState(#Item_Bouton1, 0)
Else
SetSkinItemState(#Item_Bouton1, 1)
EndIf
Case #Item_Bouton2
If GetSkinItemState(#Item_Bouton1)
SetSkinItemState(#Item_Bouton1, 0)
EndIf
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf