diff options
author | ROllerozxa <temporaryemail4meh+github@gmail.com> | 2021-12-29 23:00:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-29 23:00:56 +0100 |
commit | 52e03a8485d3f2ad9c2aa14341a2ad5aca74ee9d (patch) | |
tree | 79c04b2041d72c7306e325e9879ce6a07bcd71b8 /source/Irrlicht/CGUIListBox.cpp | |
parent | dd09fdcb4e56fc6185ed25d39ab68fad88f31e3b (diff) | |
download | irrlicht-52e03a8485d3f2ad9c2aa14341a2ad5aca74ee9d.tar.xz |
Remove unused attribute saving and loading (#86)
Diffstat (limited to 'source/Irrlicht/CGUIListBox.cpp')
-rw-r--r-- | source/Irrlicht/CGUIListBox.cpp | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/source/Irrlicht/CGUIListBox.cpp b/source/Irrlicht/CGUIListBox.cpp index 65434fa..f6f0e77 100644 --- a/source/Irrlicht/CGUIListBox.cpp +++ b/source/Irrlicht/CGUIListBox.cpp @@ -685,86 +685,6 @@ bool CGUIListBox::getSerializationLabels(EGUI_LISTBOX_COLOR colorType, core::str }
-//! Writes attributes of the element.
-void CGUIListBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
-{
- IGUIListBox::serializeAttributes(out,options);
-
- // todo: out->addString ("IconBank", IconBank->getName?);
- out->addBool ("DrawBack", DrawBack);
- out->addBool ("MoveOverSelect", MoveOverSelect);
- out->addBool ("AutoScroll", AutoScroll);
-
- out->addInt("ItemCount", Items.size());
- for (u32 i=0;i<Items.size(); ++i)
- {
- core::stringc label("text");
- label += i;
- out->addString(label.c_str(), Items[i].Text.c_str() );
-
- for ( s32 c=0; c < (s32)EGUI_LBC_COUNT; ++c )
- {
- core::stringc useColorLabel, colorLabel;
- if ( !getSerializationLabels((EGUI_LISTBOX_COLOR)c, useColorLabel, colorLabel) )
- return;
- label = useColorLabel; label += i;
- if ( Items[i].OverrideColors[c].Use )
- {
- out->addBool(label.c_str(), true );
- label = colorLabel; label += i;
- out->addColor(label.c_str(), Items[i].OverrideColors[c].Color);
- }
- else
- {
- out->addBool(label.c_str(), false );
- }
- }
- }
- out->addInt("Selected", Selected);
-}
-
-
-//! Reads attributes of the element
-void CGUIListBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
-{
- clear();
-
- DrawBack = in->getAttributeAsBool("DrawBack", DrawBack);
- MoveOverSelect = in->getAttributeAsBool("MoveOverSelect", MoveOverSelect);
- AutoScroll = in->getAttributeAsBool("AutoScroll", AutoScroll);
-
- IGUIListBox::deserializeAttributes(in,options);
-
- const s32 count = in->getAttributeAsInt("ItemCount");
- for (s32 i=0; i<count; ++i)
- {
- core::stringc label("text");
- ListItem item;
-
- label += i;
- item.Text = in->getAttributeAsStringW(label.c_str());
-
- addItem(item.Text.c_str(), item.Icon);
-
- for ( u32 c=0; c < EGUI_LBC_COUNT; ++c )
- {
- core::stringc useColorLabel, colorLabel;
- if ( !getSerializationLabels((EGUI_LISTBOX_COLOR)c, useColorLabel, colorLabel) )
- return;
- label = useColorLabel; label += i;
- Items[i].OverrideColors[c].Use = in->getAttributeAsBool(label.c_str());
- if ( Items[i].OverrideColors[c].Use )
- {
- label = colorLabel; label += i;
- Items[i].OverrideColors[c].Color = in->getAttributeAsColor(label.c_str());
- }
- }
- }
- Selected = in->getAttributeAsInt("Selected", Selected);
- recalculateScrollPos();
-}
-
-
void CGUIListBox::recalculateItemWidth(s32 icon)
{
if (IconBank && icon > -1 &&
|