Local ButtonStep = 0

'Interface
If (KeyHit(KeyUp1) Or KeyHit(KeyUp2)) Then
	SelectedButton = SelectedButton - 1
End If
If (KeyHit(KeyDown1) Or KeyHit(KeyDown2)) Then
	SelectedButton = SelectedButton + 1
End If
' Selecting
If (KeyHit(KeyEnter1) Or KeyHit(KeyEnter2)) Then
	MenuLevel = SelectedButton
End If



'Fix
If (SelectedButton > 5) Then
   SelectedButton = 0
EndIf
If (SelectedButton < 0) Then
   SelectedButton = 5
EndIf

MusicChannel.Stop()

Local i
For i = 0 To 5
	SetColor(0, 170, 0)
	DrawText(ButtonText[i], width / 2 - 30, height / 2 + 50 + ButtonStep)
	SetColor(255, 255, 255)
	If (i = SelectedButton) Then
		SetBlend(ALPHABLEND)
			SetAlpha(0.3)
  				 DrawImage(ButtonImg, width / 2 - 30 + 40, height / 2 + 50 + ButtonStep)
			SetAlpha(1)
	End If
	ButtonStep = ButtonStep + 50
Next









