Ejemplo n.º 1
0
        public GameObjectPainter(IInteractive gameObject)
        {
            control = new Button();
            GameObjectType type = TypeRestorer.GetGameObjectType(gameObject);

            // Style
            control.BackColor = Color.FromArgb(250, 204, 152);
            //control.ForeColor = Color.FromArgb(250, 204, 152);
            control.Height = 300;
            control.Width  = 200;
            // end style

            var typeLabel = TypeLabels.From(type);

            typeLabel.BackColor = Color.Transparent;
            control.Controls.Add(typeLabel);
            typeLabel.Width    = control.Width / 2;
            typeLabel.Height   = control.Height / 6;
            typeLabel.Location = new Point(
                control.Width
                - typeLabel.Width
                - control.Width / 20,
                control.Height - typeLabel.Height);

            this.gameObject = gameObject;
        }
Ejemplo n.º 2
0
        public CardControl(Card card)
        {
            gameObject = card;
            InitializeComponent();
            this.nameLabel.Text = card.Name;
            this.rarityColorBorder.BackColor = RarityLabels.GetColor(card.Rarity);
            typeLabel.Text = TypeLabels.GetText(card.Type);

            rarityLabel.UseCustomForeColor = true;
            rarityLabel.ForeColor          = RarityLabels.GetColor(card.Rarity);
            rarityLabel.Text = RarityLabels.GetText(card.Rarity);

            descriptionLabel.Text = card.Description;
            powerLabel.Text       = PowerLabels.GetText(card);
        }