public static Color AsColor(this CardButtonType cardButtonType)
        {
            switch (cardButtonType)
            {
            case CardButtonType.Action:
                return(Color.Black);

            case CardButtonType.Agenda:
                return(Color.Chocolate);

            case CardButtonType.Act:
                return(Color.BurlyWood);

            case CardButtonType.Enemy:
                return(Color.SlateBlue);

            case CardButtonType.Treachery:
                return(Color.SlateGray);

            case CardButtonType.Asset:
                return(Color.DarkBlue);

            case CardButtonType.Skill:
                return(Color.DarkGoldenrod);

            case CardButtonType.Event:
                return(Color.DarkGreen);

            default:
                return(Color.DarkGray);
            }
        }
Beispiel #2
0
        private static Bitmap CreateSolidBackgroundBitmap(CardButtonType cardButtonType)
        {
            var bitmap = new Bitmap(ImageHeightAndWidth, ImageHeightAndWidth);

            using (var gfx = Graphics.FromImage(bitmap)) {
                var brush = new SolidBrush(cardButtonType.AsColor());
                gfx.FillRectangle(brush, 0, 0, ImageHeightAndWidth, ImageHeightAndWidth);
            }

            return(bitmap);
        }