I don't know what happenning, but when i create a listbox, it crashes :(
My code:
[code]
CEGUI::Listbox* work= (CEGUI::Listbox*)CEGUI::WindowManager::getSingleton().getWindow("ChatWindow/ListBox");
CEGUI::ListboxTextItem *listboxitem = new CEGUI::ListboxTextItem("MessageToDisplay");
work->addItem(listboxitem);
work->ensureItemIsVisible(win3->getItemCount());
work->show();
mEditorGuiSheet->addChildWindow(win3);
[/code]
My xml:
<?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="TaharezLook/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="TaharezLook/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>
Problem with Listbox
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 4
- Joined: Tue Aug 15, 2006 16:13
- Location: 23
- Contact:
-
- Not too shy to talk
- Posts: 23
- Joined: Thu Jun 22, 2006 13:32
- Location: Hungary, Debrecen
- Contact:
Re: Problem with Listbox
killzone721 wrote:I don't know what happenning, but when i create a listbox, it crashes
My code:Code: Select all
CEGUI::Listbox* work= (CEGUI::Listbox*)CEGUI::WindowManager::getSingleton().getWindow("ChatWindow/ListBox");
CEGUI::ListboxTextItem *listboxitem = new CEGUI::ListboxTextItem("MessageToDisplay");
work->addItem(listboxitem);
work->ensureItemIsVisible(win3->getItemCount());
work->show();
mEditorGuiSheet->addChildWindow(win3);
What is win3? Becouse you use it and maybe unicialized.
My code:
Code: Select all
TexFilter = (CEGUI::Combobox*)Wmgr->getWindow("OptionsDialog/Graphics/TexFilter");
TexFilter->addItem(new CEGUI::ListboxTextItem("None"));
TexFilter->addItem(new CEGUI::ListboxTextItem("Bilinear"));
TexFilter->addItem(new CEGUI::ListboxTextItem("Trilinear"));
TexFilter->addItem(new CEGUI::ListboxTextItem("Anisotropic"));
-
- Just popping in
- Posts: 4
- Joined: Tue Aug 15, 2006 16:13
- Location: 23
- Contact:
Ok so i remoeved the xml file and created my own window, however it still crashes ......... :S
My code:
CEGUI::Listbox* TexFilter = (CEGUI::Listbox*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/ListBar", (CEGUI::utf8*)"VideoListBox");
TexFilter->addItem(new CEGUI::ListboxTextItem("None"));
TexFilter->addItem(new CEGUI::ListboxTextItem("Bilinear"));
TexFilter->addItem(new CEGUI::ListboxTextItem("Trilinear"));
TexFilter->addItem(new CEGUI::ListboxTextItem("Anisotropic"));
What am i doing wrong that it crashes
My code:
CEGUI::Listbox* TexFilter = (CEGUI::Listbox*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/ListBar", (CEGUI::utf8*)"VideoListBox");
TexFilter->addItem(new CEGUI::ListboxTextItem("None"));
TexFilter->addItem(new CEGUI::ListboxTextItem("Bilinear"));
TexFilter->addItem(new CEGUI::ListboxTextItem("Trilinear"));
TexFilter->addItem(new CEGUI::ListboxTextItem("Anisotropic"));
What am i doing wrong that it crashes
-
- Just popping in
- Posts: 4
- Joined: Tue Aug 15, 2006 16:13
- Location: 23
- Contact:
ok it compiles now, thanks to you but it doesn't show............................ :S
My code:
CEGUI::Combobox* objectComboBox = (CEGUI::Combobox*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Combobox", (CEGUI::utf8*)"VideoListBox");
objectComboBox->addItem(new CEGUI::ListboxTextItem("None"));
objectComboBox->addItem(new CEGUI::ListboxTextItem("Bilinear"));
objectComboBox->addItem(new CEGUI::ListboxTextItem("Trilinear"));
objectComboBox->addItem(new CEGUI::ListboxTextItem("Anisotropic"));
mEditorGuiSheet->addChildWindow(Multiplayerbutton);
objectComboBox->setAlwaysOnTop(true);
objectComboBox->show();
objectComboBox->setPosition(CEGUI::Point(0.0f, 0.0f));
objectComboBox->setSize(CEGUI::Size(1.0f, 1.0f));
what do you think i am doing wrong
My code:
CEGUI::Combobox* objectComboBox = (CEGUI::Combobox*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Combobox", (CEGUI::utf8*)"VideoListBox");
objectComboBox->addItem(new CEGUI::ListboxTextItem("None"));
objectComboBox->addItem(new CEGUI::ListboxTextItem("Bilinear"));
objectComboBox->addItem(new CEGUI::ListboxTextItem("Trilinear"));
objectComboBox->addItem(new CEGUI::ListboxTextItem("Anisotropic"));
mEditorGuiSheet->addChildWindow(Multiplayerbutton);
objectComboBox->setAlwaysOnTop(true);
objectComboBox->show();
objectComboBox->setPosition(CEGUI::Point(0.0f, 0.0f));
objectComboBox->setSize(CEGUI::Size(1.0f, 1.0f));
what do you think i am doing wrong
-
- Not too shy to talk
- Posts: 23
- Joined: Thu Jun 22, 2006 13:32
- Location: Hungary, Debrecen
- Contact:
killzone721 wrote:CEGUI::Combobox* objectComboBox = (CEGUI::Combobox*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Combobox", (CEGUI::utf8*)"VideoListBox");
objectComboBox->addItem(new CEGUI::ListboxTextItem("None"));
objectComboBox->addItem(new CEGUI::ListboxTextItem("Bilinear"));
objectComboBox->addItem(new CEGUI::ListboxTextItem("Trilinear"));
objectComboBox->addItem(new CEGUI::ListboxTextItem("Anisotropic"));
mEditorGuiSheet->addChildWindow(Multiplayerbutton);
objectComboBox->setAlwaysOnTop(true);
objectComboBox->show();
objectComboBox->setPosition(CEGUI::Point(0.0f, 0.0f));
objectComboBox->setSize(CEGUI::Size(1.0f, 1.0f));
mEditorGuiSheet->addChildWindow(Multiplayerbutton);
With this you added the Multiplayerbutton, where are you add the objectComboBox? You created it here, but i dont see where are you add it to the GuiSheet.
Xir.
Looks like
should be
Code: Select all
mEditorGuiSheet->addChildWindow(Multiplayerbutton);
should be
Code: Select all
mEditorGuiSheet->addChildWindow(objectComboBox);
-
- Not too shy to talk
- Posts: 23
- Joined: Thu Jun 22, 2006 13:32
- Location: Hungary, Debrecen
- Contact:
Trentin wrote:Looks likeCode: Select all
mEditorGuiSheet->addChildWindow(Multiplayerbutton);
should beCode: Select all
mEditorGuiSheet->addChildWindow(objectComboBox);
Yes, thats what i suggested.
-
- Just popping in
- Posts: 4
- Joined: Tue Aug 15, 2006 16:13
- Location: 23
- Contact:
Who is online
Users browsing this forum: No registered users and 14 guests