Page 1 of 2

CJK IME for CEGUI

Posted: Mon Sep 27, 2004 08:52
by CrazyEddie
I'll need to look at the backspace issue and get back to you...

For setting the text, you can use utf8 encoded strings as this is the native type supported by the gui system. What I might do is add a couple of helper methods to the system that will enable you do encode and decode utf8 data; I think this would be a big help, what do you think?

CJK IME for CEGUI

Posted: Mon Sep 27, 2004 13:43
by CrazyEddie
I tried to reproduce the backsapce issue, but it all worked okay here :? I think I didn't do something right though.

I changed the font from tahoma.ttf to simhei.ttf and that worked okay. So I thought I'd try something different; I set up the Chinese IME and played about with that but didn't get anywhere, of course this was probably more to do with the fact I don't know Chinese than anything else :oops: Really you should be able to use the IME to enter the Chinese into the editbox, but I couldn't get that to work properly (I'll have to spend a little while seeing if I can get some of this working a bit better).

Can you explain in more detail what I have to do to demonstrate the problem? Also is it the 'abc' glyphs that do not delete or was it Chinese?

Thanks for any extra information :)

CJK IME for CEGUI

Posted: Mon Sep 27, 2004 17:57
by CrazyEddie
Thanks for the clarification.

You can send me an archive containing the files. Send it to me at the address you get from the email button below :)

Thanks,

CE.

CJK IME for CEGUI

Posted: Tue Sep 28, 2004 08:40
by CrazyEddie
I can't PM you as Guest :D

I can download from you if you already have FTP set-up, though not for a little while as I will not be at the compuer :) I'll reply again this afternoon and arrange the download :)

CE.

CJK IME for CEGUI

Posted: Tue Sep 28, 2004 10:03
by CrazyEddie
I'm downloading now... Currently I have a 4 hour estimate for completion :shock:

CE.

CJK IME for CEGUI

Posted: Tue Sep 28, 2004 10:32
by CrazyEddie
Okay then, we'll try that :)

I'll cancel the download...

CE.

CJK IME for CEGUI

Posted: Tue Sep 28, 2004 10:45
by CrazyEddie
I am now signed in as [email removed; to protect the innocent ;)]

CJK IME for CEGUI

Posted: Tue Sep 28, 2004 12:23
by CrazyEddie
I have tested out the app. The problem appears to be that when e->getKeyChar() is called from the GuiManager::keyPressed method for injecting inputs, the method is returning character codes for the non-printable codes which are then getting inserted into the editbox (which means there are glyphs defined for those code points).

So what is happening when you press backspace is that the character to the left of the carat is being erased, but is immediately replaced with a code point generated for the backspace key, so you can delete a single character and then you get stuck.

For a fix: in the GuiManager::setupGlyphsSet() method change the mAsciiSet initialisation to start at 32 (space character) instead of 0, this should ensure that those non-printable codes are rejected properly :)

HTH

CE.