@@ -632,85 +632,6 @@ bool GUIButton::isDrawingBorder() const
632632}
633633
634634
635- // ! Writes attributes of the element.
636- void GUIButton::serializeAttributes (io::IAttributes* out, io::SAttributeReadWriteOptions* options=0 ) const
637- {
638- IGUIButton::serializeAttributes (out,options);
639-
640- out->addBool (" PushButton" , IsPushButton );
641- if (IsPushButton)
642- out->addBool (" Pressed" , Pressed);
643-
644- for ( u32 i=0 ; i<(u32 )EGBIS_COUNT; ++i )
645- {
646- if ( ButtonImages[i].Texture )
647- {
648- core::stringc name ( GUIButtonImageStateNames[i] );
649- out->addTexture (name.c_str (), ButtonImages[i].Texture );
650- name += " Rect" ;
651- out->addRect (name.c_str (), ButtonImages[i].SourceRect );
652- }
653- }
654-
655- out->addBool (" UseAlphaChannel" , UseAlphaChannel);
656- out->addBool (" Border" , DrawBorder);
657- out->addBool (" ScaleImage" , ScaleImage);
658-
659- for ( u32 i=0 ; i<(u32 )EGBS_COUNT; ++i )
660- {
661- if ( ButtonSprites[i].Index >= 0 )
662- {
663- core::stringc nameIndex ( GUIButtonStateNames[i] );
664- nameIndex += " Index" ;
665- out->addInt (nameIndex.c_str (), ButtonSprites[i].Index );
666-
667- core::stringc nameColor ( GUIButtonStateNames[i] );
668- nameColor += " Color" ;
669- out->addColor (nameColor.c_str (), ButtonSprites[i].Color );
670-
671- core::stringc nameLoop ( GUIButtonStateNames[i] );
672- nameLoop += " Loop" ;
673- out->addBool (nameLoop.c_str (), ButtonSprites[i].Loop );
674-
675- core::stringc nameScale ( GUIButtonStateNames[i] );
676- nameScale += " Scale" ;
677- out->addBool (nameScale.c_str (), ButtonSprites[i].Scale );
678- }
679- }
680-
681- // out->addString ("OverrideFont", OverrideFont);
682- }
683-
684-
685- // ! Reads attributes of the element
686- void GUIButton::deserializeAttributes (io::IAttributes* in, io::SAttributeReadWriteOptions* options=0 )
687- {
688- IGUIButton::deserializeAttributes (in,options);
689-
690- IsPushButton = in->getAttributeAsBool (" PushButton" );
691- Pressed = IsPushButton ? in->getAttributeAsBool (" Pressed" ) : false ;
692-
693- core::rect<s32> rec = in->getAttributeAsRect (" ImageRect" );
694- if (rec.isValid ())
695- setImage ( in->getAttributeAsTexture (" Image" ), rec);
696- else
697- setImage ( in->getAttributeAsTexture (" Image" ) );
698-
699- rec = in->getAttributeAsRect (" PressedImageRect" );
700- if (rec.isValid ())
701- setPressedImage ( in->getAttributeAsTexture (" PressedImage" ), rec);
702- else
703- setPressedImage ( in->getAttributeAsTexture (" PressedImage" ) );
704-
705- setDrawBorder (in->getAttributeAsBool (" Border" ));
706- setUseAlphaChannel (in->getAttributeAsBool (" UseAlphaChannel" ));
707- setScaleImage (in->getAttributeAsBool (" ScaleImage" ));
708-
709- // setOverrideFont(in->getAttributeAsString("OverrideFont"));
710-
711- updateAbsolutePosition ();
712- }
713-
714635// PATCH
715636GUIButton* GUIButton::addButton (IGUIEnvironment *environment,
716637 const core::rect<s32>& rectangle, ISimpleTextureSource *tsrc,
0 commit comments