Пример #1
0
        /// <summary>
        /// Clones the Toggle
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            GUIToggle ret = new GUIToggle();

            // GUIControl level copy
            ret.ID          = this.ID;
            ret.Name        = this.Name;
            ret.Layout      = this.Layout.Clone() as ToggleLayout;
            ret.Scene       = this.Scene;
            ret.Parent      = this.Parent;
            ret.AnchorFlags = this.AnchorFlags;
            ret.Mask        = this.Mask;

            // GUITable level copy
            ret.DefaultState = this.DefaultState;
            ret.OffTexture   = this.OffTexture;
            ret.OnTexture    = this.OnTexture;

            return(ret);
        }
Пример #2
0
        /// <summary>
        /// Clones the Toggle
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            GUIToggle ret = new GUIToggle();

            // GUIControl level copy
            ret.ID = this.ID;
            ret.Name = this.Name;
            ret.Layout = this.Layout.Clone() as ToggleLayout;
            ret.Scene = this.Scene;
            ret.Parent = this.Parent;
            ret.AnchorFlags = this.AnchorFlags;
            ret.Mask = this.Mask;

            // GUITable level copy
            ret.DefaultState = this.DefaultState;
            ret.OffTexture = this.OffTexture;
            ret.OnTexture = this.OnTexture;

            return ret;
        }