Example #1
0
        public override string Compile()
        {
            if (IsEnhancedClient)
            {
                return(String.Empty);
            }

            var compiled = String.Empty;

            if (!VirtualAsset.IsNullOrEmpty(_Asset))
            {
                _Asset.ForEach(
                    (x, y, c) =>
                {
                    if (!c.IsEmpty && c != Color.Transparent)
                    {
                        compiled += Compile(x, y, 1, 1, c);
                    }
                });
            }

            if (String.IsNullOrWhiteSpace(compiled))
            {
                compiled = Compile(_X, _Y, Width, Height, Color.Transparent);
            }

            return(compiled);
        }
Example #2
0
        public override void AppendTo(IGumpWriter disp)
        {
            if (IsEnhancedClient)
            {
                AppendEmptyLayout(disp);
                return;
            }

            var first = true;

            if (!VirtualAsset.IsNullOrEmpty(_Asset))
            {
                _Asset.ForEach(
                    (x, y, c) =>
                {
                    if (!c.IsEmpty && c != Color.Transparent)
                    {
                        AppendTo(disp, ref first, x, y, 1, 1, c);
                    }
                });
            }

            if (first)
            {
                AppendTo(disp, ref first, _X, _Y, Width, Height, Color.Transparent);
            }
        }
 public virtual void AddAsset(int x, int y, VirtualAsset asset)
 {
     Add(new GumpAsset(x, y, asset));
 }
 protected bool LoadAsset(string path)
 {
     return(!VirtualAsset.IsNullOrEmpty(VirtualAsset.LoadAsset(path)));
 }
Example #5
0
 /// <summary>
 /// Reloads a single virtual asset.
 /// </summary>
 /// <param name="self">The asset to reload.</param>
 public static void Reload(this VirtualAsset self)
 => ((patch_VirtualAsset)(object)self).Reload();
Example #6
0
 public GumpAsset(int x, int y, VirtualAsset asset)
 {
     _X     = x;
     _Y     = y;
     _Asset = asset;
 }
Example #7
0
 public GumpAsset(int x, int y, FileInfo file)
     : this(x, y, VirtualAsset.LoadAsset(file))
 {
 }
Example #8
0
 public GumpAsset(int x, int y, Uri url)
     : this(x, y, VirtualAsset.LoadAsset(url))
 {
 }
Example #9
0
 public GumpAsset(int x, int y, string path)
     : this(x, y, VirtualAsset.LoadAsset(path))
 {
 }
Example #10
0
        public override void Dispose()
        {
            _Asset = null;

            base.Dispose();
        }
Example #11
0
		public GumpAsset(int x, int y, VirtualAsset asset)
		{
			_X = x;
			_Y = y;
			_Asset = asset;
		}
Example #12
0
		public override void Dispose()
		{
			_Asset = null;

			base.Dispose();
		}
Example #13
0
		public virtual void AddAsset(int x, int y, VirtualAsset asset)
		{
			Add(new GumpAsset(x, y, asset));
		}