private void renderGear(Graphics g, Gear gear, Point origin) { if (g == null || gear == null) { return; } Pen pen = GearGraphics.GetGearItemBorderPen(gear.Grade); if (pen != null) { Point[] path = GearGraphics.GetIconBorderPath(origin.X, origin.Y - 32); g.DrawLines(pen, path); } g.DrawImage(Resource.Item_shadow, origin.X + 3, origin.Y - 6); if (gear.IconRaw.Bitmap != null) { g.DrawImage(gear.IconRaw.Bitmap, origin.X - gear.IconRaw.Origin.X, origin.Y - gear.IconRaw.Origin.Y); } if (gear.Cash) { /* * int value; * if (gear.Props.TryGetValue(GearPropType.royalSpecial, out value) && value > 0) * g.DrawImage(Resource.CashItem_label_0, origin.X + 20, origin.Y - 12); * else if (gear.Props.TryGetValue(GearPropType.masterSpecial, out value) && value > 0) * g.DrawImage(Resource.CashItem_label_3, origin.X + 20, origin.Y - 12); * else */ g.DrawImage(Resource.CashItem_0, origin.X + 20, origin.Y - 12); } }
private void drawGearIcon(Gear gear, Graphics g, int x, int y) { if (gear == null || g == null) { return; } if (gear.State == GearState.disable) { g.DrawImage(Resource.Equip_character_disabled, x, y); } Pen pen = GearGraphics.GetGearItemBorderPen(gear.Grade); if (pen != null) { Point[] path = GearGraphics.GetIconBorderPath(x, y); g.DrawLines(pen, path); } g.DrawImage(gear.Icon.Bitmap, x - gear.Icon.Origin.X, y + 32 - gear.Icon.Origin.Y); }
private void renderGear(Graphics g, Gear gear, Point origin) { if (g == null || gear == null) { return; } Pen pen = GearGraphics.GetGearItemBorderPen(gear.Grade); if (pen != null) { Point[] path = GearGraphics.GetIconBorderPath(origin.X, origin.Y - 32); g.DrawLines(pen, path); } g.DrawImage(Resource.Item_shadow, origin.X + 3, origin.Y - 6); if (gear.IconRaw.Bitmap != null) { g.DrawImage(gear.IconRaw.Bitmap, origin.X - gear.IconRaw.Origin.X, origin.Y - gear.IconRaw.Origin.Y); } if (gear.Cash) { g.DrawImage(Resource.CashItem_0, origin.X + 20, origin.Y - 12); } }