Look at this pic: (ctrl++ to zoom the browser )
As you can see, the listbox text looks strange. I don't know why.
This is the xml layout for the listbox:
Code: Select all
<?xml version="1.0" ?>
<GUILayout>
<Window Type="DefaultWindow" Name="ReceiveChatWindow">
<Property Name="Position" Value="x:0.0 y:0.00" />
<Property Name="Size" Value="w:1.000000 h:0.900000" />
<Window Type="WindowsLook/Listbox" Name="ChatWindow/ListBox">
<Property Name="Position" Value="x:0.05 y:0.03" />
<Property Name="Size" Value="w:0.9 h:0.1" />
</Window>
<Window Type="WindowsLook/Editbox" Name="ChatWindow/EditBox2">
<Property Name="Position" Value="x:0.05 y:0.8" />
<Property Name="Size" Value="w:0.9 h:0.05" />
</Window>
</Window>
</GUILayout>
and this is the code i use to put text on the listbox:
Code: Select all
CEGUI::Listbox* win3= (CEGUI::Listbox*)CEGUI::WindowManager::getSingleton().getWindow("ChatWindow/ListBox");
CEGUI::ListboxTextItem *listboxitem = new CEGUI::ListboxTextItem("MessageToDisplay");
win3->addItem(listboxitem);
win3->ensureItemIsVisible(win3->getItemCount());
I'm pretty sure that the text is displayed, because when I change the text, i can aprreciate the changes. But it si displayed strangely.
Maybe some font problems? But when i try to change the font using Setfont("Tahoma-14") the application freezes.
And this is the code i use to load the layout, and to hide the editbox (that will pop out when i press a key)
Code: Select all
CEGUI::Window* sheet =
CEGUI::WindowManager::getSingleton().loadWindowLayout(
(CEGUI::utf8*)"ReceiveChat.layout");
CEGUI::Window* win= CEGUI::WindowManager::getSingleton().getWindow("ReceiveChatWindow");
win->show();
State::gGUISystem->setGUISheet(win);
CEGUI::Window* win2= CEGUI::WindowManager::getSingleton().getWindow("ChatWindow/EditBox2");
win2->hide();
It's an ogre application that will include a cegui chat.
Any idea of what might happen?
Thanks in advance