diff --git a/changes.txt b/changes.txt index 7407b2d9..f6bcfa7d 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ -------------------------- Changes in 1.9 (not yet released) +- CGUIListBox now serializes the state of "Selected". Feature wish by chronologicaldot (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=52719) - Bugfix: Changing focus with tab-keys now also work when elements are inside a modal screen. - COBJMeshFileLoader using a bit more exact color conversion for 0-1 to 0-255 range (same now as SColorf::toSColor uses). - Speedup for COBJMeshWriter diff --git a/source/Irrlicht/CGUIListBox.cpp b/source/Irrlicht/CGUIListBox.cpp index 6e37266e..a4ebe60f 100644 --- a/source/Irrlicht/CGUIListBox.cpp +++ b/source/Irrlicht/CGUIListBox.cpp @@ -724,6 +724,7 @@ void CGUIListBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWr } } } + out->addInt("Selected", Selected); } @@ -763,6 +764,8 @@ void CGUIListBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadW } } } + Selected = in->getAttributeAsInt("Selected", Selected); + recalculateScrollPos(); }