Scrolling works initially, but if you scroll near to the end of the list, the scrolling functionality stops until you change the y-position of the mouse cursor.
Not sure if this has something to do with the "setMouseInputPropagationEnabled" / "setMousePassThroughEnabled".
The code basically looks like this:
Code: Select all
CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window* myRoot = wmgr.createWindow( "DefaultWindow", "root" );
myRoot->setMousePassThroughEnabled(true);
CEGUI::System::getSingleton().setGUISheet( myRoot );
CEGUI::FrameWindow* mainWindow = (CEGUI::FrameWindow*)wmgr.createWindow( "WindowsLook/FrameWindow" );
myRoot->addChildWindow( mainWindow );
mainWindow->setPosition( CEGUI::UVector2( CEGUI::UDim( 0, 50.0f ), CEGUI::UDim( 0, 50.0f ) );
mainWindow->setSize( CEGUI::UVector2( CEGUI::UDim( 0, 150.0f ), CEGUI::UDim( 0, 80.0f ) );
mainWindow->setMouseInputPropagationEnabled(true);
CEGUI::ItemListbox* listBox = (CEGUI::ItemListbox*)wmgr.createWindow("WindowsLook/ItemListbox", "playerList");
mainWindow->addChildWindow(listBox);
listBox->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0), CEGUI::UDim(0, 0)));
listBox->setSize(CEGUI::UVector2(CEGUI::UDim(1.0f, 0), CEGUI::UDim(1.0f, 0)));
listBox->setSortEnabled(true);
listBox->setMouseInputPropagationEnabled(true);
for (size_t i = 0; i < 20; ++i)
{
CEGUI::ItemEntry* item = (CEGUI::ItemEntry*)CEGUI::WindowManager::getSingleton().createWindow("WindowsLook/ItemEntry");
item->setText("Test Item");
listBox->addItem(item);
}
