Graphical Input ? (Equivalent of Blitz3D Input)

BlitzMax Forums/BlitzMax Beginners Area/Graphical Input ? (Equivalent of Blitz3D Input)

You have to draw the cursor yourself.

Replace the Text() function within the TInput declaration with this...

Function Text$(Text$,X,Y)
    
        Local aKeytoGet = GetChar()
        If aKeytoGet'Anykey was pressed
        
            If aKeytoGet = 13 'ENTER


                Text$ = tempText$
                If Text$ = "" Then Text = " "
                tempText$ = ""
                FlushKeys
                Return Text$
            Else If aKeytoGet = 8 Or aKeytoGet = 4 'AscII For Backspace And Delete
                If Len( tempText$ ) > 0 Then tempText$ = Left$( tempText$, Len(tempText$) -1 )    
            Else' If aKeytoGet>=32 And aKeytoGet<=122 And Len(Message)<52
                tempText$:+ Chr$(aKeytoGet)
            EndIf

        EndIf
        
        DrawText Text$ + tempText,X,Y
        If (MilliSecs() Mod 750) < 375
            DrawRect X + TextWidth(Text$ + tempText), Y, TextWidth(" "), TextHeight(" ")
        EndIf
        
        Return ""

EndFunction