If I store a pointer for each CEGUI::ListboxTextItem that I add to my combobox and if I have to change their text - for translation purposes for example, will it stay sorted? I'm asking because it's not sorted with me.

Thanks,
Dirso.
Moderators: CEGUI MVP, CEGUI Team
Code: Select all
static_cast<CEGUI::Combobox*>(getWindow(ID))->setSortingEnabled(true);
Code: Select all
static_cast<CEGUI::Combobox*>(getWindow(ID))->setSortingEnabled(false);
static_cast<CEGUI::Combobox*>(getWindow(ID))->setSortingEnabled(true);
scriptkid wrote:Hi,
yeah that looks okay. I checked the code, and (re)sorting is not a part of the update method i mentioned. I've added this to Mantis. A workaround would be to cause a resort manually by saying:Code: Select all
static_cast<CEGUI::Combobox*>(getWindow(ID))->setSortingEnabled(false);
static_cast<CEGUI::Combobox*>(getWindow(ID))->setSortingEnabled(true);
but i noticed that the (re)sort will sort from high to low, which is not correct i think. If you use SVN, the fix has already been made (so you can use the workaround).
Otherwise you have to wait for an update, and re-add the items yourself.
Sorry
Users browsing this forum: Bing [Bot] and 6 guests