Exemplo n.º 1
0
 public CropTexture(CElement el)
 {
     InitializeComponent();
     this.image.Source = el.getTexture().img;
     Canvas.SetLeft(rect, el.UV1.X);
     Canvas.SetTop(rect, el.UV1.Y);
     rect.Width           = el.UV2.X - el.UV1.X;
     rect.Height          = el.UV2.Y - el.UV1.Y;
     this.SelectedTexture = el.getTexture();
     RefCropImage();
 }
Exemplo n.º 2
0
        public Ctexture getTexture()
        {
            string tname = this.Texture;

            if (this.OLDTexture && tname.Trim().ToLower() == "HUDAtlas".Trim().ToLower())
            {
                tname = "HUDAtlase";
            }
            Ctexture texture = Statik.textures.Where(x => x.Name.Trim().ToLower() == tname.Trim().ToLower()).FirstOrDefault();

            return(texture);
        }