ComboBox action based on item id
Posted: Sat Jun 23, 2012 18:40
hi Crazy Eddie and people,
sorry for creating another thread with the same subject as the previous one, but i thought that the old post wouldnt be answered anymore..anyways..so i have implemented a combobox list menu, but i want to give life to it, in other words i want to give an action to each item of the combobox, so i cant figure out how to do it..
i have tried this : objectComboBox->subscribeEvent(CEGUI::Combobox::EventListSelectionAccepted, CEGUI::Event::Subscriber(&BasicTutorial7::createNinja, this));
but it doesnt matter what item id is selected , it creates the ninja anyways, i tried to create an if statement but then i realized that it doesnt have anything to do with ogre but with CEGUI..i thought it must have some sort of fucntion to subscribe a specific item from the Item list..
can any of you get me some help regarding the text above?
thx in advance,
Romulo Romero
sorry for creating another thread with the same subject as the previous one, but i thought that the old post wouldnt be answered anymore..anyways..so i have implemented a combobox list menu, but i want to give life to it, in other words i want to give an action to each item of the combobox, so i cant figure out how to do it..
i have tried this : objectComboBox->subscribeEvent(CEGUI::Combobox::EventListSelectionAccepted, CEGUI::Event::Subscriber(&BasicTutorial7::createNinja, this));
but it doesnt matter what item id is selected , it creates the ninja anyways, i tried to create an if statement but then i realized that it doesnt have anything to do with ogre but with CEGUI..i thought it must have some sort of fucntion to subscribe a specific item from the Item list..
can any of you get me some help regarding the text above?
thx in advance,
Romulo Romero