Jack106
06-11-2009 19:40:43
Hey guys,
i will try to write this post in english, i hope you will understand everything.
I used QuickGUI 9.10 know for 1day with ogre 1.61 and i have problem with the consol widget, i didn't find any post where the same problem is describted, thus i have to ask you . I hope the information about my system are enough, if not please point it out.
I had add an ConsoleInputHandler to my Consol.
When i used this, the text was add but with a few upheavals.
So I changed it to this:
Then it works well when i only add one line text, but only without escape squenzes, witch you can see here:
So i tryed to fit it with qt, in this way, but it didn't worked too.
Maybe i haden't find the thread and the solution is somewhere in this forum, but if it isn't maybe you could help me.
Thank you for reading and i hope for and answer soon.
Greetings Jack106
i will try to write this post in english, i hope you will understand everything.
I used QuickGUI 9.10 know for 1day with ogre 1.61 and i have problem with the consol widget, i didn't find any post where the same problem is describted, thus i have to ask you . I hope the information about my system are enough, if not please point it out.
I had add an ConsoleInputHandler to my Consol.
Console Code:
QuickGUI::ConsoleDesc* cd = QuickGUI::DescManager::getSingletonPtr()->getDefaultConsoleDesc();
cd->resetToDefault();
cd->widget_name = "Debug Consol"; cd->widget_dimensions.position = QuickGUI::Point(0,0);
cd->widget_dimensions.size = QuickGUI::Size(400,100);
cd->console_inputBoxDefaultFontName = "micross.16";
debugbox = m_Sheet->createConsole(cd);
debugbox->setDragable(false);
debugbox->setVisible(false);
debugbox->setConsoleInputHandler(&MOB_Scene_Base::gDebug_prase,this);
ConsoleInputHandler:
void MOB_Scene_Base::gDebug_prase(QuickGUI::Console* c, bool& clearInputBox, bool& addToDisplayArea)
{
clearInputBox = true;
addToDisplayArea = true;
}
When i used this, the text was add but with a few upheavals.
So I changed it to this:
void MOB_Scene_Base::gDebug_prase(QuickGUI::Console* c, bool& clearInputBox, bool& addToDisplayArea)
{
clearInputBox = true;
addToDisplayArea = false;
c->addDisplayAreaText(c->getInputBoxText());
}
Then it works well when i only add one line text, but only without escape squenzes, witch you can see here:
void MOB_Scene_Base::gDebug_prase(QuickGUI::Console* c, bool& clearInputBox, bool& addToDisplayArea)
{
clearInputBox = true;
addToDisplayArea = false;
c->addDisplayAreaText(c->getInputBoxText().append("\r"));
}
So i tryed to fit it with qt, in this way, but it didn't worked too.
clearInputBox = true;
addToDisplayArea = false;
//QuickGUI::Console::getInputBoxText();
QString textpre = QString::fromStdString((c->getDisplayAreaText().asUTF8()));
c->clearDisplayArea();
QString textnow = QString::fromStdString((c->getInputBoxText().asUTF8()));
c->clearInputBox();
QString text = "";
text = text.append(textpre);
text = text.append(textnow);
text = text.append("\n");
qDebug() << text;
c->addDisplayAreaText(text.toStdString());
Maybe i haden't find the thread and the solution is somewhere in this forum, but if it isn't maybe you could help me.
Thank you for reading and i hope for and answer soon.
Greetings Jack106