Page 1 of 1

Is this the right solution to the language problem?

Posted: Tue Sep 04, 2018 1:27 pm
by Pinic
Is this the right solution to the language problem? Sorry that without translation)

Если у кого проблеммы с вводом русского (или какого другого) текста, то вот солюшн:
В исходниках движка в файле CIrrDeviceWin32.cpp на примерно 200-ой строчке меняем
WORD KeyAsc=0;
на
WCHAR KeyUni=0;
ниже строчку
ToAscii(wParam,lParam,allKeys,&KeyAsc,0);
меняем на
ToUnicode(wParam,lParam,allKeys,&KeyUni,1,0);
пересобираем библиотеку, ложим в нужное место либу и dll (а может можно и просто dll...) и радуемся:)

Re: Is this the right solution to the language problem?

Posted: Tue Sep 04, 2018 2:30 pm
by MartinVee
You can use Google Translate when you want to pass information around.
If anyone has problems with the introduction of Russian (or some other) text, here is the solution:
In the source code of the engine in the file CIrrDeviceWin32.cpp on the approximately 200th line, we change
WORD KeyAsc = 0;
on
WCHAR KeyUni = 0;
Below line
ToAscii (wParam, lParam, allKeys, & KeyAsc, 0);
change to
ToUnicode (wParam, lParam, allKeys, & KeyUni, 1.0);
rebuild the library, we put the lib and dll in the right place (or maybe just dll ...) and are happy :)

Re: Is this the right solution to the language problem?

Posted: Tue Sep 04, 2018 3:13 pm
by Pinic
Is the solution?

If someone has problems with typing in Russian (or any other) text, here's the solution:
In the source code of the engine in the file CIrrDeviceWin32.cpp at about 200-th line change
WORD KeyAsc = 0;
on
WCHAR KeyUni = 0;
the line below
ToAscii (wParam, lParam, allKeys, & KeyAsc, 0);
change to
ToUnicode (wParam, lParam, allKeys, & KeyUni, 1,0);
rebuild the library, put in the right place Libu and dll (and maybe you can just dll ...) and rejoice :)

Re: Is this the right solution to the language problem?

Posted: Tue Sep 04, 2018 5:29 pm
by CuteAlien
It's one solution I guess. Thougt we use ToAsciiEx since Irrlicht 1.7, so it looks like you run a very old Irrlicht version.

Re: Is this the right solution to the language problem?

Posted: Wed Sep 05, 2018 12:40 pm
by Pinic
And how to do on the new version?

Re: Is this the right solution to the language problem?

Posted: Wed Sep 05, 2018 1:07 pm
by CuteAlien
It should work already I think.

Re: Is this the right solution to the language problem?

Posted: Wed Sep 26, 2018 11:57 pm
by Pinic
I can't solve my language problem. I upload Russian fonts but they are not displayed. What to do who can that prompt?

Re: Is this the right solution to the language problem?

Posted: Thu Sep 27, 2018 7:41 am
by devsh
Irrlicht GUI by default only creates a font atlas for most used Unicode characters... I believe Russian codes are not in that atlas and thats the source of your problem.

However I have very little experience with Irrlicht GUI.

Re: Is this the right solution to the language problem?

Posted: Thu Sep 27, 2018 2:53 pm
by CuteAlien
I used russian fonts before, they should work. But can't tell much without seeing font-file and code-example.

Re: Is this the right solution to the language problem?

Posted: Fri Sep 28, 2018 3:38 am
by Pinic
Шрифты создал с помощью программы IrrFont которая находится в папках с движком код gui и загрузки шрифтов из примера irrlicht. Написал " -2018" отобразились только цифры.

Fonts created with this program IrrFont which is in the folder with the engine. gui code and download fonts from the irrlicht example. Wrote "Дэмо игра - 2018" display only numbers.

Re: Is this the right solution to the language problem?

Posted: Mon Oct 01, 2018 9:58 am
by CuteAlien
And which Irrlicht Version?

Re: Is this the right solution to the language problem?

Posted: Mon Oct 01, 2018 1:30 pm
by Pinic
1.8.4
Maybe I somehow do not load correctly?Can you tell me the code to download the fonts?

Re: Is this the right solution to the language problem?

Posted: Tue Oct 02, 2018 1:39 pm
by CuteAlien
Wait - did you use the font from the Irrlicht example? That one has no cyrillic characters. Otherwise - please tell me which font you used. Example which works for me: https://bitbucket.org/mzeilfelder/irr-p ... ew-default

The corresponding font is droid_sans12.xml in this folder: https://bitbucket.org/mzeilfelder/irr-p ... at=default
(the bmp one doesn't work, not sure right now why). The font was created with the Irrlicht font tool.