Commit 920b125b authored by cutealien's avatar cutealien

Add serialization for the CGUIImage::DrawBounds stuff from last check-in.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4735 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ff7eee08
...@@ -186,6 +186,10 @@ void CGUIImage::serializeAttributes(io::IAttributes* out, io::SAttributeReadWrit ...@@ -186,6 +186,10 @@ void CGUIImage::serializeAttributes(io::IAttributes* out, io::SAttributeReadWrit
out->addColor ("Color", Color); out->addColor ("Color", Color);
out->addBool ("ScaleImage", ScaleImage); out->addBool ("ScaleImage", ScaleImage);
out->addRect ("SourceRect", SourceRect); out->addRect ("SourceRect", SourceRect);
out->addFloat ("DrawBoundsX1", DrawBounds.UpperLeftCorner.X);
out->addFloat ("DrawBoundsY1", DrawBounds.UpperLeftCorner.Y);
out->addFloat ("DrawBoundsX2", DrawBounds.LowerRightCorner.X);
out->addFloat ("DrawBoundsY2", DrawBounds.LowerRightCorner.Y);
} }
...@@ -199,6 +203,12 @@ void CGUIImage::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWri ...@@ -199,6 +203,12 @@ void CGUIImage::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWri
setColor(in->getAttributeAsColor("Color", Color)); setColor(in->getAttributeAsColor("Color", Color));
setScaleImage(in->getAttributeAsBool("ScaleImage", UseAlphaChannel)); setScaleImage(in->getAttributeAsBool("ScaleImage", UseAlphaChannel));
setSourceRect(in->getAttributeAsRect("SourceRect", SourceRect)); setSourceRect(in->getAttributeAsRect("SourceRect", SourceRect));
DrawBounds.UpperLeftCorner.X = in->getAttributeAsFloat("DrawBoundsX1", DrawBounds.UpperLeftCorner.X);
DrawBounds.UpperLeftCorner.Y = in->getAttributeAsFloat("DrawBoundsY1", DrawBounds.UpperLeftCorner.Y);
DrawBounds.LowerRightCorner.X = in->getAttributeAsFloat("DrawBoundsX2", DrawBounds.LowerRightCorner.X);
DrawBounds.LowerRightCorner.Y = in->getAttributeAsFloat("DrawBoundsY2", DrawBounds.LowerRightCorner.Y);
setDrawBounds(DrawBounds);
} }
......
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