[XNA (C#)] text input

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

[XNA (C#)] text input

Post by King Harold »

Well I kinda need a way to get text-input in XNA
Is there any normal way to go about this or would I have to code the whole thing out? (including delays and shiftkeys and capslock..)

@Ben: If you could tell me how to avoid a CallbackOnCollectedDelegate warning then I would be happy to use your hack

PS: don't worry, I still also code for TI's, but at the uni it's mostly for "normal" computers
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Indeed, XNA does not offer text input methods. This design decision is understandable as it's intended for use on the Xbox 360, but it is mildly irritating.

I believe you're using an old version of my class; make sure you're using the latest version of the code. (You can verify that the old code is broken by calling GC.Collect() - this should trigger an instant crash when the unreferenced, unmanaged callback is nuked by the garbage collector).
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

Oh cool I didn't know you had a new version :)
New one works perfectly! many thanks!
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

I'd edit the old post (adding a link to the new one), but GameDev.net is currently down. :( Sorry for any inconvenience!
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

No problem, posting here worked :)
Post Reply