mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Remove unused (de)serializeAttributes() methods
This commit is contained in:
parent
9b650b9efb
commit
05573d6d8d
10 changed files with 0 additions and 274 deletions
|
@ -588,50 +588,6 @@ s32 StaticText::getTextWidth() const
|
|||
}
|
||||
|
||||
|
||||
//! Writes attributes of the element.
|
||||
//! Implement this to expose the attributes of your element for
|
||||
//! scripting languages, editors, debuggers or xml serialization purposes.
|
||||
void StaticText::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
|
||||
{
|
||||
IGUIStaticText::serializeAttributes(out,options);
|
||||
|
||||
out->addBool ("Border", Border);
|
||||
out->addBool ("OverrideColorEnabled",true);
|
||||
out->addBool ("OverrideBGColorEnabled",ColoredText.hasBackground());
|
||||
out->addBool ("WordWrap", WordWrap);
|
||||
out->addBool ("Background", Background);
|
||||
out->addBool ("RightToLeft", RightToLeft);
|
||||
out->addBool ("RestrainTextInside", RestrainTextInside);
|
||||
out->addColor ("OverrideColor", ColoredText.getDefaultColor());
|
||||
out->addColor ("BGColor", ColoredText.getBackground());
|
||||
out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames);
|
||||
out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames);
|
||||
|
||||
// out->addFont ("OverrideFont", OverrideFont);
|
||||
}
|
||||
|
||||
|
||||
//! Reads attributes of the element
|
||||
void StaticText::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
|
||||
{
|
||||
IGUIStaticText::deserializeAttributes(in,options);
|
||||
|
||||
Border = in->getAttributeAsBool("Border");
|
||||
setWordWrap(in->getAttributeAsBool("WordWrap"));
|
||||
Background = in->getAttributeAsBool("Background");
|
||||
RightToLeft = in->getAttributeAsBool("RightToLeft");
|
||||
RestrainTextInside = in->getAttributeAsBool("RestrainTextInside");
|
||||
if (in->getAttributeAsBool("OverrideColorEnabled"))
|
||||
ColoredText.setDefaultColor(in->getAttributeAsColor("OverrideColor"));
|
||||
if (in->getAttributeAsBool("OverrideBGColorEnabled"))
|
||||
ColoredText.setBackground(in->getAttributeAsColor("BGColor"));
|
||||
|
||||
setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames),
|
||||
(EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames));
|
||||
|
||||
// OverrideFont = in->getAttributeAsFont("OverrideFont");
|
||||
}
|
||||
|
||||
} // end namespace gui
|
||||
|
||||
#endif // USE_FREETYPE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue