Re: Анимация (и еще пару вопросов)
тогда зделай две переменных для звуков sou1 , sou2 !!
и попробуй так :
Function RefreshButton(ImBtn,x,y,txt$,n)
mx=MouseX(): my=MouseY()
MHit=MouseDown(1)
If RectsOverlap(x,y,ImageWidth(ImBtn),ImageHeight(ImB tn),mx,my,1,1)
sou1=1
f=1
y2=0
If MHit=True
sou2=1
f=2
y2=2
Button(n)=1
EndIf
Else
f=0
y2=0
EndIf
If sou1=1 Then
PlaySound SelectBut
sou1=0
EndIf
If sou2=1 Then
PlaySound ClickBut
sou2=0
EndIf
DrawImage ImBtn,x,y,f
Color 0,0,0
Text x+0.5*(ImageWidth(ImBtn)+4-Len(txt$)*FontHeight()*0.5),y+0.5*(ImageHeight(ImB tn)-4-FontHeight())+y2,txt$
End Function
|