Exemplo n.º 1
0
 public static void LoadOriginImages()
 {
     I9Gfx.Origins = new ExtendedBitmap(DatabaseAPI.Database.Origins.Count * 16, 16);
     for (int index = 0; index <= DatabaseAPI.Database.Origins.Count - 1; ++index)
     {
         int x = index * 16;
         using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(I9Gfx.GetOriginsPath() + DatabaseAPI.Database.Origins[index].Name + ".png"))
         {
             if (extendedBitmap.Size.Height > 16 | extendedBitmap.Size.Width > 16)
             {
                 I9Gfx.Origins.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0, 16, 16);
             }
             else
             {
                 I9Gfx.Origins.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0);
             }
         }
     }
 }
Exemplo n.º 2
0
 public static void LoadArchetypeImages()
 {
     I9Gfx.Archetypes = new ExtendedBitmap(DatabaseAPI.Database.Classes.Length * 16, 16);
     for (int index = 0; index <= DatabaseAPI.Database.Classes.Length - 1; ++index)
     {
         int    x   = index * 16;
         string str = I9Gfx.GetOriginsPath() + DatabaseAPI.Database.Classes[index].ClassName + ".png";
         if (!File.Exists(str))
         {
             str = I9Gfx.ImagePath() + "Unknown.png";
         }
         using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(str))
         {
             if (extendedBitmap.Size.Height > 16 | extendedBitmap.Size.Width > 16)
             {
                 I9Gfx.Archetypes.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0, 16, 16);
             }
             else
             {
                 I9Gfx.Archetypes.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0);
             }
         }
     }
 }