Input in graphics mode?
BlitzMax Forums/BlitzMax Programming/Input in graphics mode?
| ||
Is there anyway to do this in blitzmax? In Blitz3d I used getkey() is there anyone who have converted a "input" function of any kind into BlitzMax? If the program stops when you input or not is not that important to me in this case. Just want a quick and easy way to do it for editing and debugging. A$ = input(" Name: ") or A$:+ Getkey() |
| ||
Check for GETCHAR and WAITCHAR |
| ||
So GetKey() is now GetChar() .. Well thanks! The workaround wasn't that hard ; The change of three letters. But getChar seems to be missing alot of characters. What are the limits? Didn't blitz3D use normal ASCII chars? Because in B3D all symbols on my keyboards worked with getkey.. Anyway it works for plain english =) |
| ||
Few explanations here Not sure what's being done about the drawtext display of the £ key. |
| ||
And that's not the only sign that's missing I'm afraid |
| ||
Actually, it looks like a problem with the default font rather than Getchar or Drawtext. Try this... (changing font dir if necessary)... Graphics 640, 480, 0 Local DefaultFont:TImageFont Local NewFont:TImageFont DefaultFont = GetImageFont() NewFont = LoadImageFont("c:/winnt/fonts/Arial.ttf", 20)'For demonstration purposes only ;o) SetImageFont(NewFont) Local t$ While Not KeyHit( KEY_ESCAPE ) Local c=GetChar() If c t:+Chr(c) Cls DrawText t,0,0 Flip Wend <edit> If there's still a problem post which keys show nothing. |
| ||
Thanks! Would never have figured that out. The only sign I could not get was €. But that is totally unimporant for my games for now. Now it's just about finding some good free fonts! |
| ||
Yeah, you need a font that has those characters to use those characters. However, I still have trouble displaying Japanese and Chinese characters. I got a UNICODE font with all the characters available for all the supported UNICODE languages. I think somewhere in the process of Readline from a text file, and the drawtext, etc., it is not UNICODE. |