public override void DrawVisualMenuEntry() { base.DrawVisualMenuEntry(); GesamtGraphic = Graphics.FromImage(Gesamt); GesamtGraphic.FillRectangle(EntryBackgroundBrush, new RectangleF(windowSize.Width * 0.15f, CurrentMenuItemIndex * OptionButtonHeight, OptionButtonWidth, OptionButtonHeight)); for (int i = 0; i < Entries.Count; i++) { GesamtGraphic.FillRectangle(EntryBackgroundBrush, new RectangleF(windowSize.Width * 0.15f, i * OptionButtonHeight, OptionButtonWidth, OptionButtonHeight)); GesamtGraphic.DrawString(Entries[i].Title, SystemFonts.DefaultFont, Brushes.White, windowSize.Width * 0.15f, i * OptionButtonHeight); //Checks für verschiedene Typen an Optionen if (Entries[i].GetType() == typeof(VisualMenuEntryPlayerClassOption)) { GesamtGraphic.DrawImage(((VisualMenuEntryPlayerClassOption)Entries[i]).CurrPlayerClass.ClassBitmap, windowSize.Width / 2, i * OptionButtonHeight); } if (Entries[i].GetType() == typeof(VisualMenuEntryChangeTilesetOption)) { GesamtGraphic.DrawImage(((VisualMenuEntryChangeTilesetOption)Entries[i]).PreviewTile, windowSize.Width / 2, i * OptionButtonHeight); } } GesamtGraphic.Dispose(); }
public void DrawBackground() { //Zeichnen des Hintergrunds GesamtGraphic = Graphics.FromImage(Background); GesamtGraphic.FillRectangle(Brushes.Gray, new Rectangle(0, 0, Gesamt.Width, Gesamt.Height)); //Hintergrund GesamtGraphic.FillRectangle(MenuBrush, new Rectangle(0, 0, Gesamt.Width, Gesamt.Height)); //menuBrush über Hintergrund gelegt GesamtGraphic.Dispose(); }
public override void DrawVisualMenuEntry() { base.DrawVisualMenuEntry(); GesamtGraphic = Graphics.FromImage(Gesamt); GesamtGraphic.FillRectangle(EntryBackgroundBrush, new RectangleF(windowSize.Width * 0.15f, CurrentMenuItemIndex * OptionButtonHeight, OptionButtonWidth, OptionButtonHeight)); for (int i = 0; i < Entries.Count; i++) { GesamtGraphic.FillRectangle(EntryBackgroundBrush, new RectangleF(windowSize.Width * 0.15f, i * OptionButtonHeight, OptionButtonWidth, OptionButtonHeight)); GesamtGraphic.DrawString(Entries[i].Title, SystemFonts.DefaultFont, Brushes.White, windowSize.Width * 0.15f, i * OptionButtonHeight); } GesamtGraphic.Dispose(); }