/// <summary> /// Clones (deep copies) the GUI Slider /// </summary> /// <returns></returns> public override object Clone() { GUISlider ret = new GUISlider(); if (ret == null) { throw new OutOfMemoryException("GUISlider.Clone() failed its allocation."); } // GUIControl level copy ret.ID = this.ID; ret.Parent = this.Parent; ret.Name = this.Name; ret.Layout = this.Layout.Clone() as SliderLayout; ret.Scene = this.Scene; ret.AnchorFlags = this.AnchorFlags; ret.Mask = this.Mask; // GUISlider level copy ret.ThumbWidth = ThumbWidth; ret.ThumbHeight = ThumbHeight; ret.StartTexture = this.StartTexture; ret.MiddleTexture = this.MiddleTexture; ret.EndTexture = this.EndTexture; ret.ThumbTexture = this.ThumbTexture; ret.Step = this.Step; return(ret); }
/// <summary> /// Clones (deep copies) the GUI Slider /// </summary> /// <returns></returns> public override object Clone() { GUISlider ret = new GUISlider(); if (ret == null) throw new OutOfMemoryException("GUISlider.Clone() failed its allocation."); // GUIControl level copy ret.ID = this.ID; ret.Parent = this.Parent; ret.Name = this.Name; ret.Layout = this.Layout.Clone() as SliderLayout; ret.Scene = this.Scene; ret.AnchorFlags = this.AnchorFlags; ret.Mask = this.Mask; // GUISlider level copy ret.ThumbWidth = ThumbWidth; ret.ThumbHeight = ThumbHeight; ret.StartTexture = this.StartTexture; ret.MiddleTexture = this.MiddleTexture; ret.EndTexture = this.EndTexture; ret.ThumbTexture = this.ThumbTexture; ret.Step = this.Step; return ret; }