'This BMX file was edited with BLIde ( http://www.blide.org )

If KeyHit(KEY_ESCAPE) Then
	FlushKeys()
	MenuLevel = 10
End If
DrawText("Press ESC for back", width / 2 - 50, height - 30)

WaitEvent

If (Left(CurrentEvent.ToString(), 5) = "KeyUp") Then
	PlayerNameLocal = PlayerNameLocal + Chr(CurrentEvent.data)
End If

DrawText "Enter your name: " + PlayerNameLocal, width / 2 - 100, height / 2
If (KeyHit(KEY_BACKSPACE) and PlayerNameLocal.Length > 0) Then
	PlayerNameLocal = Left(PlayerNameLocal, PlayerNameLocal.Length - 2)
End If
								  
If (KeyHit(KeyEnter1) Or KeyHit(KeyEnter2)) Then
	PlayerName = PlayerNameLocal
	Local File:TStream = WriteFile("Saves\Profile.lgc")
	WriteLine(File, "OK")
	WriteInt(File, 0)
	CloseFile(File)
	MenuLevel = 10
EndIf



