Esempio n. 1
0
 public VillagerDisplay(SimpleVillager villager)
 {
     InitializeComponent();
     if (villagerImage == null)
     {
         villagerImage = Image.FromFile("Resources/Images/Villagers.jpg");
     }
     RestoreFromVillager(villager);
 }
Esempio n. 2
0
 public void RestoreFromVillager(SimpleVillager villager)
 {
     villagerPreview.Image  = villagerImage;
     villagerPreview.Offset =
         (villager.VillagerId < 0xE000 || villager.VillagerId > 0xE0EB)
                 ? new Point(64 * 6, 64 * 23)
                 : new Point(64 * ((villager.VillagerId & 0xFF) % 10),
                             64 * ((villager.VillagerId & 0xFF) / 10));
     nameLabel.Text     = villager.Name;
     wikiButton.Enabled = villager.Name != "Unknown" && !villager.Name.Contains("DLC Villager");
     Villager           = villager;
 }
Esempio n. 3
0
 public static VillagerDisplay CreateFromVillagerObject(SimpleVillager villager)
 {
     return(new VillagerDisplay(villager));
 }