aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/CGUIButton.cpp
diff options
context:
space:
mode:
authorROllerozxa <temporaryemail4meh+github@gmail.com>2021-12-29 23:00:56 +0100
committerGitHub <noreply@github.com>2021-12-29 23:00:56 +0100
commit52e03a8485d3f2ad9c2aa14341a2ad5aca74ee9d (patch)
tree79c04b2041d72c7306e325e9879ce6a07bcd71b8 /source/Irrlicht/CGUIButton.cpp
parentdd09fdcb4e56fc6185ed25d39ab68fad88f31e3b (diff)
downloadirrlicht-52e03a8485d3f2ad9c2aa14341a2ad5aca74ee9d.tar.xz
Remove unused attribute saving and loading (#86)
Diffstat (limited to 'source/Irrlicht/CGUIButton.cpp')
-rw-r--r--source/Irrlicht/CGUIButton.cpp97
1 files changed, 0 insertions, 97 deletions
diff --git a/source/Irrlicht/CGUIButton.cpp b/source/Irrlicht/CGUIButton.cpp
index 95d2b37..704fd3d 100644
--- a/source/Irrlicht/CGUIButton.cpp
+++ b/source/Irrlicht/CGUIButton.cpp
@@ -556,103 +556,6 @@ bool CGUIButton::isDrawingBorder() const
}
-//! Writes attributes of the element.
-void CGUIButton::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 CGUIButton::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
-{
- IGUIButton::deserializeAttributes(in,options);
-
- IsPushButton = in->getAttributeAsBool("PushButton", IsPushButton);
- Pressed = IsPushButton ? in->getAttributeAsBool("Pressed", Pressed) : false;
-
- for ( u32 i=0; i<(u32)EGBIS_COUNT; ++i )
- {
- core::stringc nameRect( GUIButtonImageStateNames[i] );
- nameRect += "Rect";
-
- setImage((EGUI_BUTTON_IMAGE_STATE)i,
- in->getAttributeAsTexture(GUIButtonImageStateNames[i], ButtonImages[i].Texture),
- in->getAttributeAsRect(nameRect.c_str(), ButtonImages[i].SourceRect) );
- }
-
- setDrawBorder(in->getAttributeAsBool("Border", DrawBorder));
- setUseAlphaChannel(in->getAttributeAsBool("UseAlphaChannel", UseAlphaChannel));
- setScaleImage(in->getAttributeAsBool("ScaleImage", ScaleImage));
-
- for ( u32 i=0; i<(u32)EGBS_COUNT; ++i )
- {
- core::stringc nameIndex( GUIButtonStateNames[i] );
- nameIndex += "Index";
- ButtonSprites[i].Index = in->getAttributeAsInt(nameIndex.c_str(), ButtonSprites[i].Index );
-
- core::stringc nameColor( GUIButtonStateNames[i] );
- nameColor += "Color";
- ButtonSprites[i].Color = in->getAttributeAsColor(nameColor.c_str(), ButtonSprites[i].Color );
-
- core::stringc nameLoop( GUIButtonStateNames[i] );
- nameLoop += "Loop";
- ButtonSprites[i].Loop = in->getAttributeAsBool(nameLoop.c_str(), ButtonSprites[i].Loop );
-
- core::stringc nameScale( GUIButtonStateNames[i] );
- nameScale += "Scale";
- ButtonSprites[i].Scale = in->getAttributeAsBool(nameScale.c_str(), ButtonSprites[i].Scale );
- }
-
- // setOverrideFont(in->getAttributeAsString("OverrideFont"));
-
- updateAbsolutePosition();
-}
-
-
} // end namespace gui
} // end namespace irr