} //中心图片缩放 public override void ShowTip(ImageToolTip tooltip, Control form, int x, int y) { var regionType = GetVType(); if (regionType == PictureRegionCellType.Item) { Image image = HItemBook.GetPreview(nid); tooltip.Show(image, form, x, y); } else if (regionType == PictureRegionCellType.Gismo) { Image image = DungeonBook.GetPreview(nid); tooltip.Show(image, form, x, y); } else if (regionType == PictureRegionCellType.People) { Image image = SamuraiBook.GetPreview(nid); tooltip.Show(image, form, x, y); } else if (regionType == PictureRegionCellType.DungeonItem) { var itemConfig = ConfigData.GetDungeonItemConfig(nid); Image image = DrawTool.GetImageByString(itemConfig.Name + "$" + itemConfig.Des, 160); tooltip.Show(image, form, x, y); } }
void virtualRegion_RegionEntered(int id, int x, int y, int key) { Image image = null; image = HItemBook.GetPreview(itemid); toolTip.Show(image, this, 108, 44); }
private void ItemView_MouseMove(object sender, MouseEventArgs e) { int truex = e.X - 6; int truey = e.Y - 36; if (truex > 5 && truey > 3 && truex < 315 + 5 && truey < 318 + 3) { int temp = (truex - 8) * 10 / 315 + (truey - 5) * 10 / 318 * 10; if (temp != tar) { tar = temp; if (baseid + tar < UserProfile.InfoBag.BagCount && UserProfile.InfoBag.Items[baseid + tar].Type != 0) { Image image = HItemBook.GetPreview(UserProfile.InfoBag.Items[baseid + tar].Type); tooltip.Show(image, this, (tar % 10) * 315 / 10 + 42, (tar / 10) * 318 / 10 + 42); } else { tooltip.Hide(this); } Invalidate(new Rectangle(6, 36, 324, 324)); } } else { tar = -1; tooltip.Hide(this); Invalidate(new Rectangle(6, 36, 324, 324)); } }
private void virtualRegion_RegionEntered(int id, int x, int y, int key) { Image image = null; if (id == 1) {//1一定是heroskill image = HeroPowerBook.GetPreview(key); } else { if (key > 0) { var cellType = cellTypeList[id - 2]; if (cellType == PictureRegionCellType.Card) { image = CardAssistant.GetCard(key).GetPreview(CardPreviewType.Normal, new int[] { }); } else if (cellType == PictureRegionCellType.Item) { image = HItemBook.GetPreview(key); } else if (cellType == PictureRegionCellType.Equip) { Equip equip = new Equip(key); image = equip.GetPreview(); } } } if (image != null) { tooltip.Show(image, this, x, y); } }
private void ItemView_MouseMove(object sender, MouseEventArgs e) { int temp = -1; int index = -1; foreach (MiniItemViewItem item in items) { if (item.IsInArea(e.X, e.Y)) { temp = item.itemPos; index = item.Id - 1; break; } } if (temp != tar) { tar = temp; if (tar != -1) { Image image = HItemBook.GetPreview(UserProfile.InfoBag.Items[tar].Type); tooltip.Show(image, this, (index % 2) * 30 - image.Width + 2, (index / 2) * 35 + 3); } else { tooltip.Hide(this); } } }
private void virtualRegion_RegionEntered(int id, int x, int y, int key) { if (key > 10) { Image image = HItemBook.GetPreview(key); tooltip.Show(image, this, x, y); } }
private void virtualRegion_RegionEntered(int info, int mx, int my, int key) { if (itemId > 0) { Image image = HItemBook.GetPreview(itemId); tooltip.Show(image, parent, mx, my, itemId); } }
private void virtualRegion_RegionEntered(int id, int x, int y, int key) { if (key > 0) { Image image = HItemBook.GetPreview(key); tooltip.Show(image, this, x + panelBack.Location.X, y + panelBack.Location.Y); } }
private void virtualRegion_RegionEntered(int info, int mx, int my, int key) { if (info == 1 && productId > 0) { GameShopConfig gameShopConfig = ConfigData.GetGameShopConfig(productId); Image image = null; var eid = HItemBook.GetItemId(gameShopConfig.Item); image = HItemBook.GetPreview(eid); tooltip.Show(image, parent, mx, my, eid); } }
private void OnVRegionEntered(int id, int x, int y, int key) { if (key > 0) { Image image = HItemBook.GetPreview(key); tooltip.Show(image, this, x, y); } else { tooltip.Hide(this); } }
void virtualRegion_RegionEntered(int id, int x, int y, int key) { Image image = null; var isEquip = ConfigIdManager.IsEquip(itemid); if (!isEquip) { image = HItemBook.GetPreview(itemid); } else { Equip equip = new Equip(itemid); image = equip.GetPreview(); } toolTip.Show(image, this, 108, 44); }
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.Item) { Image image = HItemBook.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); } } } }
private void virtualRegion_RegionEntered(int info, int mx, int my, int key) { if (info == 1 && itemId > 0) { Image image = null; var isEquip = ConfigIdManager.IsEquip(itemId); if (!isEquip) { image = HItemBook.GetPreview(itemId); } else { Equip equip = new Equip(itemId); image = equip.GetPreview(); } tooltip.Show(image, parent, mx, my, itemId); } }
private void virtualRegion_RegionEntered(int id, int x, int y, int key) { lastKey = key; if (key > 0) { var region = vRegion.GetRegion(id); if (region != null) { Image image = HItemBook.GetPreview(key); tooltip.Show(image, parent, x, y); } } if (id == 20) { tooltip.Show("不提交", parent, x, y); } }
private void virtualRegion_RegionEntered(int info, int mx, int my, int key) { if (info == 1 && productId > 0) { GameShopConfig gameShopConfig = ConfigData.GetGameShopConfig(productId); Image image = null; var isEquip = ConfigIdManager.IsEquip(gameShopConfig.ItemId); if (!isEquip) { image = HItemBook.GetPreview(gameShopConfig.ItemId); } else { Equip equip = new Equip(gameShopConfig.ItemId); image = equip.GetPreview(); } tooltip.Show(image, parent, mx, my, gameShopConfig.ItemId); } }
private void virtualRegion_RegionEntered(int id, int x, int y, int key) { if (key == 0) { return; } Image image = null; if (id >= 2) { image = HItemBook.GetPreview(key); } else { Equip equip = new Equip(key); image = equip.GetPreview(); } tooltip.Show(image, this, x, y); }