wilsonwing
12-12-2008 03:59:58
I am a beginner of QuickQUI.
I've searched the form and find some similar problem.
I use QuickGUI 8.09 version and Ogre1.6.0.
This is what I do in my code:
I got runtime error with the code above.
[url=http://img389.imageshack.us/my.php?image=errdg9.jpg][img="http://img389.imageshack.us/img389/6109/errdg9.th.jpg" alt=""]
I searched and found someone add code:
This time I can run my work but the output characters looked square, not the character I want to present.
(Button at the top left)
This is my fontdef:
And also it seems no difference if I add code_points 33-166 12290-12291 19986-40959 65280-65312 or not.
I really wants to try QuickGUI because it looks great.
Please help ,great thanks in advance
I've searched the form and find some similar problem.
I use QuickGUI 8.09 version and Ogre1.6.0.
This is what I do in my code:
QuickGUI::Sheet* defaultSheet = m_pGUIManager->getActiveSheet();
QuickGUI::ButtonDesc bd;
bd.name = "MyButton";
bd.dimensions.size = QuickGUI::Size(200,50);
bd.dimensions.position = QuickGUI::Point(50,50);
bd.textDesc.segments.push_back(QuickGUI::TextSegment("MeFont",Ogre::ColourValue::Red,("ä¸æ–‡æ¸¬è©¦")));
QuickGUI::Button* myButton = defaultSheet->createButton(bd);
I got runtime error with the code above.
[url=http://img389.imageshack.us/my.php?image=errdg9.jpg][img="http://img389.imageshack.us/img389/6109/errdg9.th.jpg" alt=""]
I searched and found someone add code:
bd.textDesc.segments.push_back(QuickGUI::TextSegment("MeFont",Ogre::ColourValue::Red,ConvertToUTF("ä¸æ–‡æ¸¬è©¦")));
Ogre::UTFString ConvertToUTF(Ogre::String String)
{
Ogre::UTFString UTFString;
int i;
Ogre::UTFString::code_point cp;
for (i=0; i<(int)String.size(); ++i)
{
cp = String[i];
cp &= 0xFF;
UTFString.append(1, cp);
}
return UTFString;
}
This time I can run my work but the output characters looked square, not the character I want to present.
(Button at the top left)
This is my fontdef:
MeFont
{
type truetype
source cfmingeb.ttf
size 12
resolution 96
code_points 33-166 12290-12291 19986-40959 65280-65312
}
And also it seems no difference if I add code_points 33-166 12290-12291 19986-40959 65280-65312 or not.
I really wants to try QuickGUI because it looks great.
Please help ,great thanks in advance