CGUIListBox now serializes the state of 'Selected'.

Feature wish by chronologicaldot (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=52719)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6218 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2021-06-01 11:05:54 +00:00
parent f31c1be792
commit ca48a1ac69
2 changed files with 4 additions and 0 deletions

@ -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

@ -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();
}