diff options
Diffstat (limited to 'src/gui/guiButton.cpp')
-rw-r--r-- | src/gui/guiButton.cpp | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/src/gui/guiButton.cpp b/src/gui/guiButton.cpp index d6dbddf54..ba95b81c3 100644 --- a/src/gui/guiButton.cpp +++ b/src/gui/guiButton.cpp @@ -632,85 +632,6 @@ bool GUIButton::isDrawingBorder() const }
-//! Writes attributes of the element.
-void GUIButton::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
-{
- IGUIButton::serializeAttributes(out,options);
-
- out->addBool ("PushButton", IsPushButton );
- if (IsPushButton)
- out->addBool("Pressed", Pressed);
-
- for ( u32 i=0; i<(u32)EGBIS_COUNT; ++i )
- {
- if ( ButtonImages[i].Texture )
- {
- core::stringc name( GUIButtonImageStateNames[i] );
- out->addTexture(name.c_str(), ButtonImages[i].Texture);
- name += "Rect";
- out->addRect(name.c_str(), ButtonImages[i].SourceRect);
- }
- }
-
- out->addBool ("UseAlphaChannel", UseAlphaChannel);
- out->addBool ("Border", DrawBorder);
- out->addBool ("ScaleImage", ScaleImage);
-
- for ( u32 i=0; i<(u32)EGBS_COUNT; ++i )
- {
- if ( ButtonSprites[i].Index >= 0 )
- {
- core::stringc nameIndex( GUIButtonStateNames[i] );
- nameIndex += "Index";
- out->addInt(nameIndex.c_str(), ButtonSprites[i].Index );
-
- core::stringc nameColor( GUIButtonStateNames[i] );
- nameColor += "Color";
- out->addColor(nameColor.c_str(), ButtonSprites[i].Color );
-
- core::stringc nameLoop( GUIButtonStateNames[i] );
- nameLoop += "Loop";
- out->addBool(nameLoop.c_str(), ButtonSprites[i].Loop );
-
- core::stringc nameScale( GUIButtonStateNames[i] );
- nameScale += "Scale";
- out->addBool(nameScale.c_str(), ButtonSprites[i].Scale );
- }
- }
-
- // out->addString ("OverrideFont", OverrideFont);
-}
-
-
-//! Reads attributes of the element
-void GUIButton::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
-{
- IGUIButton::deserializeAttributes(in,options);
-
- IsPushButton = in->getAttributeAsBool("PushButton");
- Pressed = IsPushButton ? in->getAttributeAsBool("Pressed") : false;
-
- core::rect<s32> rec = in->getAttributeAsRect("ImageRect");
- if (rec.isValid())
- setImage( in->getAttributeAsTexture("Image"), rec);
- else
- setImage( in->getAttributeAsTexture("Image") );
-
- rec = in->getAttributeAsRect("PressedImageRect");
- if (rec.isValid())
- setPressedImage( in->getAttributeAsTexture("PressedImage"), rec);
- else
- setPressedImage( in->getAttributeAsTexture("PressedImage") );
-
- setDrawBorder(in->getAttributeAsBool("Border"));
- setUseAlphaChannel(in->getAttributeAsBool("UseAlphaChannel"));
- setScaleImage(in->getAttributeAsBool("ScaleImage"));
-
- // setOverrideFont(in->getAttributeAsString("OverrideFont"));
-
- updateAbsolutePosition();
-}
-
// PATCH
GUIButton* GUIButton::addButton(IGUIEnvironment *environment,
const core::rect<s32>& rectangle, ISimpleTextureSource *tsrc,
|