Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: What is the CORRECT Way to get ASCII

  1. #11

    What is the CORRECT Way to get ASCII

    Quote Originally Posted by jasonf
    One thing to note chaps, there don't appear to be any constants for the unicode letters for UpperCase letters. I've used SDLK_*-32 for my tests, which seems to work.

    ..or am I not supposed to be using the SDLK constants on the Unicode value?
    What do you need constants for?
    In the documentation that's included with JEDI-SDL there's an example of reading input by using unicode.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  2. #12

    What is the CORRECT Way to get ASCII

    The last time I looked into the examples, was about 4 or 5 years ago when JEDI-SDL was young and innocent. When I did the SFont conversion from C, many moons ago.

    The input part of my engine is a fair few years old too, I never even though about looking at the examples for input.. If I was starting to put network code into the engine, I'd look at them.. but otherwise, How would I know to look there?...

    I spent a while searching on the net for examples and I was running into dead ends and I needed to get it fixed quickly. Hence my half rabid spleen venting :LOL:

    I know it works now, this thread exists on here in case anyone else runs in to a similar problem and I can help out...

    You have to admit though, it's not very intuitive..

    There should be a function

    getAsciiForKeySym( Key: KeySym; Mod KModifier ): word;

    that would have made more sense to me.. it would suggest that there was some underlying logic which I could farm out to SDL to get my char value.

    That's my thinking anyway

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •