how to get events from combo box. I didnt find eget_comobox_
Damned, read those tutorials. http://irrlicht.sourceforge.net/tut005.html if you couldn't find it.
Look at the code.. it's not really the GUI-example, is it?bal wrote:Damned, read those tutorials. http://irrlicht.sourceforge.net/tut005.html if you couldn't find it.
Something went wrong when the tuts were updated. ^^.
-
- Posts: 32
- Joined: Sun Nov 23, 2003 10:23 pm
Same problem here. It seems that comboBox does not send any events when clicked or I am doing something wrong.
In event function:
106 is a ListBox and 108 is a ComboBox.
I can see the ID when I'am over the comboBox with the mouse (printf ID) but don't get the selected item when I change it. The printf in "case 108" doesn't work at all. Everything else, like my ListBox here, works fine and shows me the selected item.
In event function:
Code: Select all
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
printf("\nID: %d\n", id);
switch(id)
{
case 106:
if (event.GUIEvent.EventType == gui::EGET_LISTBOX_CHANGED)
{
selectedResolution = ((gui::IGUIListBox*)event.GUIEvent.Caller)->getSelected();
printf("\nListbox changed %d\n", selectedResolution);
}
break;
case 108:
if (event.GUIEvent.EventType == gui::EGET_LISTBOX_CHANGED)
{
selectedCombo = ((gui::IGUIComboBox*)event.GUIEvent.Caller)->getSelected();
printf("\nCombo changed %d\n", selectedCombo);
}
break;
...
I can see the ID when I'am over the comboBox with the mouse (printf ID) but don't get the selected item when I change it. The printf in "case 108" doesn't work at all. Everything else, like my ListBox here, works fine and shows me the selected item.
-
- Posts: 32
- Joined: Sun Nov 23, 2003 10:23 pm
Re: .
No, sorry. Just tried some changes in my code but nothing happens.kraket wrote:2 Harry_Mystic: had you solve this problem?
Maybe someone more experienced can have a look at this.
i saw
IMHO, according to the source i saw, EGET_BUTTON_CLICKED is only for intrnal use, e.g. to draw combo. Then the main role is ListBox and in the proram i must catch the changing of ListBox. Ok, i tried to use:
case EGET_LISTBOX_CHANGED:
case EGET_BUTTON_CLICKED:
but nothing at all.
Does anybody have a working example. Please, send it to mr_gluck@mail.ru
case EGET_LISTBOX_CHANGED:
case EGET_BUTTON_CLICKED:
but nothing at all.
Does anybody have a working example. Please, send it to mr_gluck@mail.ru