Hi,
I have some pre-allocated items in CEGUI::MultiColumnList. When I actualize some of the items, sorting is not applied? Maybe I'm doing something wrong but I haven't found anything which could be able to force list to re-sort..
Init code:
CEGUI::MultiColumnList* lbp = SAFE_CAST<CEGUI::MultiColumnList*>(m_scene->GetGUIWindowManager()->
createWindow("TaharezLook/MultiColumnList", windowName + "/ListboxPlayers"));
if (lbp)
{
m_window->addChildWindow(lbp);
lbp->setSelectionMode(CEGUI::MultiColumnList::RowSingle);
lbp->setPosition(CEGUI::Point(0.05f, 0.08f));
lbp->setSize(CEGUI::Size(0.9f, 0.47f));
lbp->addColumn("Player", 0, 0.68f);
lbp->addColumn("Score", 1, 0.25f);
for(size_t i=0; i < m_maxPlayers; i++)
{
lbp->addRow();
}
for(size_t i=0; i < m_maxPlayers; i++)
{
lbp->setItem(new CEGUI::ListboxTextItem(""), 0, (CEGUI::uint)i);
lbp->setItem(new CEGUI::ListboxTextItem(""), 1, (CEGUI::uint)i);
}
lbp->setUserSortControlEnabled(true);
lbp->setSortColumn(1);
lbp->setSortDirection(CEGUI::ListHeaderSegment::Descending);
}
And Update code:
for(i = players.size(); i < m_maxPlayers; i++)
{
m_playersList->getItemAtGridReference(CEGUI::MCLGridRef((CEGUI::uint)i, 1))->setText("Anything in sort column");
}
CEGUI::MultiColumnList force to sort?
Moderators: CEGUI MVP, CEGUI Team
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: CEGUI::MultiColumnList force to sort?
from the api ref:
void handleUpdatedItemData (void)
Inform the list box that one or more attached ListboxItems have been externally modified, and the list should re-sync its internal state and refresh the display as needed.
http://www.cegui.org.uk/api_reference/c ... nList.html
void handleUpdatedItemData (void)
Inform the list box that one or more attached ListboxItems have been externally modified, and the list should re-sync its internal state and refresh the display as needed.
http://www.cegui.org.uk/api_reference/c ... nList.html
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 5 guests
