'SUBROUTINES
'*'*'*'*'*'*'*'*'*'*'*'
'MOUSE_DOWN
GraphicsWindow.MouseDown = md
Sub md
'CLICK_RHANDLE
If x > Rhandleleft And x < Rhandleleft + 35 And y > Rhandletop And y < Rhandletop + 35 Then
Sound.PlayClick()
Controls.SetButtonCaption(Rhandleactive, 1)
EndIf
'CLICK_GHANDLE
If x > Ghandleleft And x < Ghandleleft + 35 And y > Ghandletop And y < Ghandletop + 35 Then
Sound.PlayClick()
Controls.SetButtonCaption(Ghandleactive, 1)
EndIf
'CLICK_BHANDLE
If x > Bhandleleft And x < Bhandleleft + 35 And y > Bhandletop And y < Bhandletop + 35 Then
Sound.PlayClick()
Controls.SetButtonCaption(Bhandleactive, 1)
EndIf
EndSub
'MOUSE_MOVE
GraphicsWindow.MouseMove = mm
Sub mm
x = GraphicsWindow.MouseX
y = GraphicsWindow.MouseY
'MOVE_RHANDLE
If getRhandleactive = 1 Then
If x > 150 And x < 415 And y > 100 And y < 125 Then
Shapes.Move(Rhandle, x - 10, Rhandletop)
Controls.SetButtonCaption(Ramount, Rhandleleft - 150)
getRamount = Controls.GetButtonCaption(Ramount)
If Rhandleleft > 415 Then
Shapes.Move(Rhandle, 414, Rhandletop)
EndIf
If Rhandleleft < 150 Then
Shapes.Move(Rhandle, 151, Rhandletop)
EndIf
EndIf
EndIf
'MOVE_GHANDLE
If getGhandleactive = 1 Then
If x > 150 And x < 415 And y > 200 And y < 225 Then
Shapes.Move(Ghandle, x - 10, Ghandletop)
Controls.SetButtonCaption(Gamount, Ghandleleft - 150)
getGamount = Controls.GetButtonCaption(Gamount)
If Ghandleleft > 415 Then
Shapes.Move(Ghandle, 414, Ghandletop)
EndIf
If Ghandleleft < 150 Then
Shapes.Move(Ghandle, 151, Ghandletop)
EndIf
EndIf
EndIf
'MOVE_BHANDLE
If getBhandleactive = 1 Then
If x > 150 And x < 415 And y > 300 And y < 325 Then
Shapes.Move(Bhandle, x - 10, Bhandletop)
Controls.SetButtonCaption(Bamount, Bhandleleft - 150)
getBamount = Controls.GetButtonCaption(Bamount)
If Bhandleleft > 415 Then
Shapes.Move(Bhandle, 414, Bhandletop)
EndIf
If Bhandleleft < 150 Then
Shapes.Move(Bhandle, 151, Bhandletop)
EndIf
EndIf
EndIf
'COLOR
color = GraphicsWindow.GetColorFromRGB(getRamount, getGamount, getBamount)
GraphicsWindow.BackgroundColor = color
EndSub
'MOUSE_UP
GraphicsWindow.MouseUp = mu
Sub mu
Controls.SetButtonCaption(rhandleactive, 0)
Controls.SetButtonCaption(ghandleactive, 0)
Controls.SetButtonCaption(bhandleactive, 0)
EndSub