Commit 8a6371c6 authored by cutealien's avatar cutealien

Add serialization for CGUIComboBox::MaxSelectionRows

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3884 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 0d5d30ac
...@@ -428,7 +428,7 @@ void CGUIComboBox::openCloseMenu() ...@@ -428,7 +428,7 @@ void CGUIComboBox::openCloseMenu()
Parent->bringToFront(this); Parent->bringToFront(this);
IGUISkin* skin = Environment->getSkin(); IGUISkin* skin = Environment->getSkin();
s32 h = Items.size(); u32 h = Items.size();
if (h > getMaxSelectionRows()) if (h > getMaxSelectionRows())
h = getMaxSelectionRows(); h = getMaxSelectionRows();
...@@ -470,6 +470,7 @@ void CGUIComboBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadW ...@@ -470,6 +470,7 @@ void CGUIComboBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadW
out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames); out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames);
out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames); out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames);
out->addInt("MaxSelectionRows", (s32)MaxSelectionRows );
out->addInt ("Selected", Selected ); out->addInt ("Selected", Selected );
out->addInt ("ItemCount", Items.size()); out->addInt ("ItemCount", Items.size());
...@@ -490,6 +491,7 @@ void CGUIComboBox::deserializeAttributes(io::IAttributes* in, io::SAttributeRead ...@@ -490,6 +491,7 @@ void CGUIComboBox::deserializeAttributes(io::IAttributes* in, io::SAttributeRead
setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames), setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames),
(EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames)); (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames));
setMaxSelectionRows( (u32)(in->getAttributeAsInt("MaxSelectionRows")) );
// clear the list // clear the list
clear(); clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment