Example #1
0
 private void virtualRegion_RegionEntered(int id, int x, int y, int key)
 {
     if (id >= 20)
     {
         if (key > 0)
         {
             Image image = BlessBook.GetPreview(key);
             tooltip.Show(image, parent, x, y);
         }
     }
     else if (id == 10)
     {
         Image image = GetPlayerImage();
         tooltip.Show(image, parent, 0, 50);
     }
     else if (id == 11)
     {
         Image image = GetSceneImage();
         tooltip.Show(image, parent, width - image.Width, 35);
     }
     else if (id < 10)
     {
         var    resName = HSTypes.I2Resource(id - 1);
         string resStr  = string.Format("{0}:{1}", resName, UserProfile.Profile.InfoBag.Resource.Get((GameResourceType)(id - 1)));
         Image  image   = DrawTool.GetImageByString(resStr, 100);
         tooltip.Show(image, parent, x, y);
     }
 }
Example #2
0
 private void virtualRegion_RegionEntered(int info, int mx, int my, int key)
 {
     if (blessId > 0)
     {
         Image image = BlessBook.GetPreview(key);
         tooltip.Show(image, parent, mx, my);
     }
 }
 private void PunishBless(ref int index)
 {
     if (config.PunishBlessLevel > 0)
     {
         var blessId = BlessBook.GetRandomBlessLevel(false, config.PunishBlessLevel);
         BlessManager.AddBless(blessId, GameConstants.QuestBlessTime);
         vRegion.AddRegion(new PictureRegion(index, pos.X + 3 + 20 + (index - 1) * 70, pos.Y + 3 + 25,
                                             60, 60, PictureRegionCellType.Bless, blessId));
         index++;
     }
 }
 private void virtualRegion_RegionEntered(int id, int x, int y, int key)
 {
     {
         var region = vRegion.GetRegion(id) as PictureRegion;
         if (region != null)
         {
             var regionType = region.GetVType();
             if (regionType == PictureRegionCellType.Bless)
             {
                 Image image = BlessBook.GetPreview(key);
                 tooltip.Show(image, parent, x, y);
             }
         }
     }
     {
         var region = vRegion.GetRegion(id) as ImageRegion;
         if (region != null)
         {
             var regionType = region.GetVType();
             if (regionType == ImageRegionCellType.Gold)
             {
                 string resStr = string.Format("黄金:{0}", region.Parm);
                 Image  image  = DrawTool.GetImageByString(resStr, 100);
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == ImageRegionCellType.Food)
             {
                 string resStr = string.Format("食物:{0}", region.Parm);
                 Image  image  = DrawTool.GetImageByString(resStr, 100);
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == ImageRegionCellType.Health)
             {
                 string resStr = string.Format("生命:{0}", region.Parm);
                 Image  image  = DrawTool.GetImageByString(resStr, 100);
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == ImageRegionCellType.Mental)
             {
                 string resStr = string.Format("精神:{0}", region.Parm);
                 Image  image  = DrawTool.GetImageByString(resStr, 100);
                 tooltip.Show(image, parent, x, y);
             }
         }
     }
 }