From 8a6371c6cacb9ed8cc5628ecf9b71e6a7aeb30fa Mon Sep 17 00:00:00 2001 From: cutealien Date: Wed, 20 Jul 2011 09:28:19 +0000 Subject: [PATCH] Add serialization for CGUIComboBox::MaxSelectionRows git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3884 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CGUIComboBox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Irrlicht/CGUIComboBox.cpp b/source/Irrlicht/CGUIComboBox.cpp index ce7590c5..50470e25 100644 --- a/source/Irrlicht/CGUIComboBox.cpp +++ b/source/Irrlicht/CGUIComboBox.cpp @@ -428,7 +428,7 @@ void CGUIComboBox::openCloseMenu() Parent->bringToFront(this); IGUISkin* skin = Environment->getSkin(); - s32 h = Items.size(); + u32 h = Items.size(); if (h > getMaxSelectionRows()) h = getMaxSelectionRows(); @@ -470,6 +470,7 @@ void CGUIComboBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadW out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames); out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames); + out->addInt("MaxSelectionRows", (s32)MaxSelectionRows ); out->addInt ("Selected", Selected ); out->addInt ("ItemCount", Items.size()); @@ -490,6 +491,7 @@ void CGUIComboBox::deserializeAttributes(io::IAttributes* in, io::SAttributeRead setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames), (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames)); + setMaxSelectionRows( (u32)(in->getAttributeAsInt("MaxSelectionRows")) ); // clear the list clear();