public override void RecreateFromXml( LayerEditor parentLayer, XElement xml )
        {
            base.RecreateFromXml( parentLayer, xml );

            _polygon = new Vector2[ 4 ] ;

            ParentLayer = parentLayer ;

            _properties = xml.Element( @"TexturedHullProperties" ).DeserializedAs<TexturedHullProperties>( ) ;

            initialiseTexture( _properties.TexturePathRelativeToContentRoot ) ;

            WhenUpdatedByUi( ) ;
        }
 public TexturedHullEditor( )
 {
     _properties = new TexturedHullProperties( ) ;
 }
        public override void CreateInDesignMode(LayerEditor parentLayer, IEntityCreationProperties creationProperties)
        {
            _polygon = new Vector2[ 4 ] ;

            ParentLayer = parentLayer ;

            string fullPath = null;// creationProperties.Parameters[@"FullPath"];

            initialiseTexture( fullPath ) ;

            _properties = new TexturedHullProperties
                {
                    //todo: need filename
                    Position = MouseStatus.WorldPosition,
                    TexturePathRelativeToContentRoot = makeRelativePath( new PathToFolder( parentLayer.ParentLevel.ContentRootFolder), fullPath ),
                    CustomProperties = new CustomProperties( ),
                    Visible = true,
                    Scale = Vector2.One,
                    TintColor = Color.White,
                } ;

            _properties.Origin = getTextureOrigin( ) ;

            WhenUpdatedByUi( ) ;
        }