Definitely interesting topic for investigation,
here is temporary workaround, which allows entering alpha characters and erasing them:
[code=thinbasic]
'
' The most basic skeleton for TBGL
' Petr Schreiber, started on 05-17-2009
'
Uses "TBGL"
FUNCTION TBMAIN()
LOCAL hWnd AS DWORD
LOCAL FrameRate AS DOUBLE
Local EditMode as long = %TRUE
Local i as long
Local inputText as string
' -- Create and show window
hWnd = TBGL_CreateWindowEx("TBGL script - press ESC to quit", 640, 480, 32, %TBGL_WS_WINDOWED or %TBGL_WS_CLOSEBOX)
TBGL_ShowWindow
TBGL_BuildFont TBGL_FontHandle("Arial Black", 16)
' -- Resets status of all keys
TBGL_ResetKeyState()
' -- Main loop
While TBGL_IsWindow(hWnd)
FrameRate = TBGL_GetFrameRate
TBGL_ClearFrame
TBGL_RenderMatrix2D(0,480,640,0)
if EditMode then
tbgl_PrintFont "Type your name, hero ", 100, 100, 0
tbgl_PrintFont inputText, 100, 150, 0
for i = %VK_A to %VK_Z
if TBGL_GetWindowKeyOnce(hWnd, i) then inputText += CHR$(i)
next
if TBGL_GetWindowKeyOnce(hWnd, %VK_BACK) then inputText = left$(inputText, len(inputText)-1)
end if
TBGL_DrawFrame
' -- ESCAPE key to exit application
If TBGL_GetWindowKeyState(hWnd, %VK_ESCAPE) Then Exit While
Wend
TBGL_DestroyWindow
END FUNCTION
[/code]
Petr
Bookmarks