private GroupBox CreateRollBox(Character character) { GroupBox rollBox = new GroupBox(); rollBox.Size = new Size(30, 70); rollBox.Location = new Point(205, 0); Button up = new CustomButton(); up.Location = new Point(2, 10); up.Size = new Size(25, 15); up.BackgroundImage = Properties.Resources.up_arrow; up.BackgroundImageLayout = ImageLayout.Stretch; up.BackColor = Color.WhiteSmoke; up.Click += new EventHandler(orderUp_Click); up.BringToFront(); if (combatants.IndexOf(character) == 0) { up.Enabled = false; } rollBox.Controls.Add(up); Label combatRoll = new Label(); combatRoll.Location = new Point(2, 30); combatRoll.Size = new Size(25, 15); combatRoll.Text = character.CombatRoll.ToString(); combatRoll.Font = new Font("Sans Serif", 9, FontStyle.Bold); combatRoll.TextAlign = ContentAlignment.MiddleCenter; rollBox.Controls.Add(combatRoll); combatRoll.BringToFront(); Button down = new CustomButton(); down.Location = new Point(2, 50); down.Size = new Size(25, 15); down.BackgroundImage = Properties.Resources.down_arrow; down.BackgroundImageLayout = ImageLayout.Stretch; down.Click += new EventHandler(orderDown_Click); rollBox.Controls.Add(down); down.BringToFront(); if (combatants.IndexOf(character) == combatants.Count - 1) { down.Enabled = false; } return(rollBox); }
private Button CreateRemoveButton() { Button b = new CustomButton() { Size = new Size(15, 15), Location = new Point(180, 0), BackgroundImage = Properties.Resources.close_button, BackgroundImageLayout = ImageLayout.Stretch, BackColor = Color.WhiteSmoke }; b.Click += new EventHandler(remove_Click); b.BringToFront(); return(b); }