public override int DrawDataString(Font textFont, Graphics g, int detailBoxWidth, int detailBoxHeight, int detailBoxX, int detailBoxY) { int entry = 0; //detailBoxY (obere kante des fensters + entry (Anzahl der Zeile) * Die Höhe der Schriftart g.DrawString(Prefix + Name, MethodLib.GetResizedFont(Prefix + Name, textFont, detailBoxWidth), Brushes.White, detailBoxX, detailBoxY + entry * textFont.Height); entry++; g.DrawString("Rarity: " + ((ItemRarity)Rarity).ToString(), textFont, assetHandler.Assets.RarityBrushes[Rarity], detailBoxX, detailBoxY + entry * textFont.Height); entry++; return(entry); }
private void DrawItem(Item item) { SetIconPosition(item.Prefix + item.Name); if (item.GetType() == typeof(Weapon)) { //TODO WAFFENPARAMTER ANZEIGEN } else if (item.GetType() == typeof(Armor)) { //TODO RÜSTUNGSPARAMETER ANZEIGEN } Context.DrawString(item.Prefix + item.Name + ": ", MethodLib.GetResizedFont(item.Prefix + item.Name + ": ", TextFont, (int)((double)PopupSizeX * 0.55)), Brushes.White, xPosItemBitmap - PopupSizeX * 0.55f, yPosItemBitmap); DrawItemIcon(item); }