Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Do
- PrintString (23, 1, "What do you do?")
- PrintString (24, 1, ">")
- Do
- KeyHit = InKey: If Len(KeyHit)=0 Then Sleep 5,1: Continue Do
- var iKey = cint(KeyHit[0])
- If iKey = 255 then iKey = -KeyHit[1]
- Select Case iKey
- Case 3 'Ctrl+C
- End
- Case 13, -FB.SC_DOWN
- Exit Do
- Case 32 to 127
- 'If iKey = 8 Then
- If iKey or iKey = -FB.SC_LEFT Then
- If Len(UserInput) Then
- cptr(uLong ptr, @UserInput)[1] -= 1 'Remove last char
- screensync 'Wait for VSYNC
- PrintString(23, 1, Space(SCREEN_WIDTH-2))
- PrintString(24, 1, Space(SCREEN_WIDTH-2))
- PrintString(24, 1, ">")
- End If
- Else
- If Len(UserInput) < 44 Then UserInput += KeyHit
- PrintString 24, 2, UserInput
- End If
- End Select
- Loop
- Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement