Editbox: how to insert special characters?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

djphilipe
Quite a regular
Quite a regular
Posts: 48
Joined: Thu Aug 23, 2007 10:15
Location: Slovakia
Contact:

Editbox: how to insert special characters?

Postby djphilipe » Wed Jul 08, 2009 09:00

Hi,
how I insert special characters into editbox by classic keyboard?
I tried to insert into editbox characters such as ' š ', ' č ', etc...(Slovak chars) but it doesn't work.
I have set Slovak keyboard of course.

But if I set text by method it work.

Code: Select all

pEditBox->setText(reinterpret_cast<const utf8*>("ščť"));

Image

Thanks

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Editbox: how to insert special characters?

Postby CrazyEddie » Wed Jul 08, 2009 09:27

This is really a question to ask of your chosen input library. CEGUI will respond to whichever codes (as UTF32 code points) you inject into it. I am aware of some issues with regards to injecting of multiple codepoints which are supposed to be combined to form a single glyph, in these cases that combination must be currently be detected and processed prior to injecting into CEGUI - so that CEGUI gets the final code of the glyph you want rendered.

HTH

CE.

djphilipe
Quite a regular
Quite a regular
Posts: 48
Joined: Thu Aug 23, 2007 10:15
Location: Slovakia
Contact:

Re: Editbox: how to insert special characters?

Postby djphilipe » Thu Jul 09, 2009 06:51

I use Ogre and input library is probably OIS. The problem will be in OIS? :(

Filip

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Editbox: how to insert special characters?

Postby CrazyEddie » Thu Jul 09, 2009 08:53

Well, maybe 'problem' is not the right word, since OIS does what it does pretty well. But if you're using OIS as your sole source of character inputs, then if OIS does not supply the codes needed - depending on the exact nature of the issue (basically, you're not seeing what you want, but what are you seeing instead?) there may be a way around it. If you're getting nothing from OIS then I would say it's an OIS issue, if you're getting a sequence of glyphs instead of a single glyph, then it's more complicated and you may need an additional intermediary step to translate the sequence to a single glyph.

CE.

djphilipe
Quite a regular
Quite a regular
Posts: 48
Joined: Thu Aug 23, 2007 10:15
Location: Slovakia
Contact:

Re: Editbox: how to insert special characters?

Postby djphilipe » Thu Jul 09, 2009 11:43

I have studied OIS lightly.
OIS returns OIS:KeyEvent and text(unsigned int) in keyPressed. But text is only Ascii code. And we need unicode.
Solution is use of other input library or modification of OIS.

Thanks
Filip

Speedo
Just popping in
Just popping in
Posts: 12
Joined: Fri Mar 13, 2009 23:36

Re: Editbox: how to insert special characters?

Postby Speedo » Fri Jul 10, 2009 04:51

If you get the latest OIS from CVS/SVN (whichever they use, I forget) it supports unicode input. I don't know why they haven't put out a new release so people will know where to get unicode support, but anyway. /shrug


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot] and 9 guests