public CustomTokenForm(CustomToken ct) { InitializeComponent(); Application.Idle += new EventHandler(Application_Idle); Array sizes = Enum.GetValues(typeof(CreatureSize)); foreach (CreatureSize size in sizes) { SizeBox.Items.Add(size); } fToken = ct.Copy(); NameBox.Text = fToken.Name; SizeBox.SelectedItem = fToken.TokenSize; update_power(); DetailsBox.Text = fToken.Details; int n = Creature.GetSize((CreatureSize)SizeBox.SelectedItem); TilePanel.TileSize = new Size(n, n); TilePanel.Image = fToken.Image; TilePanel.Colour = fToken.Colour; }
public CustomOverlayForm(CustomToken ct) { this.InitializeComponent(); Application.Idle += new EventHandler(this.Application_Idle); this.fToken = ct.Copy(); this.NameBox.Text = this.fToken.Name; this.WidthBox.Value = this.fToken.OverlaySize.Width; this.HeightBox.Value = this.fToken.OverlaySize.Height; this.update_power(); this.DetailsBox.Text = this.fToken.Details; this.TilePanel.TileSize = this.fToken.OverlaySize; this.TilePanel.Image = this.fToken.Image; this.TilePanel.Colour = this.fToken.Colour; this.StyleBox.Items.Add("Rounded (translucent)"); this.StyleBox.Items.Add("Block (opaque)"); switch (this.fToken.OverlayStyle) { case OverlayStyle.Rounded: { this.StyleBox.Text = "Rounded (translucent)"; break; } case OverlayStyle.Block: { this.StyleBox.Text = "Block (opaque)"; break; } } this.DifficultBox.Checked = this.fToken.DifficultTerrain; this.OpaqueBox.Checked = this.fToken.Opaque; this.TerrainLayerBox.Checked = this.fToken.IsTerrainLayer; this.IsUnSelectableBox.Checked = this.fToken.IsUnSelectable; }
public CustomTokenForm(CustomToken ct) { this.InitializeComponent(); Application.Idle += new EventHandler(this.Application_Idle); foreach (CreatureSize value in Enum.GetValues(typeof(CreatureSize))) { this.SizeBox.Items.Add(value); } this.fToken = ct.Copy(); this.NameBox.Text = this.fToken.Name; this.SizeBox.SelectedItem = this.fToken.TokenSize; this.update_power(); this.DetailsBox.Text = this.fToken.Details; int size = Creature.GetSize((CreatureSize)this.SizeBox.SelectedItem); this.TilePanel.TileSize = new System.Drawing.Size(size, size); this.TilePanel.Image = this.fToken.Image; this.TilePanel.Colour = this.fToken.Colour; }
public CustomOverlayForm(CustomToken ct) { InitializeComponent(); Application.Idle += new EventHandler(Application_Idle); fToken = ct.Copy(); NameBox.Text = fToken.Name; WidthBox.Value = fToken.OverlaySize.Width; HeightBox.Value = fToken.OverlaySize.Height; update_power(); DetailsBox.Text = fToken.Details; TilePanel.TileSize = fToken.OverlaySize; TilePanel.Image = fToken.Image; TilePanel.Colour = fToken.Colour; StyleBox.Items.Add(ROUNDED); StyleBox.Items.Add(BLOCK); switch (fToken.OverlayStyle) { case OverlayStyle.Rounded: StyleBox.Text = ROUNDED; break; case OverlayStyle.Block: StyleBox.Text = BLOCK; break; } DifficultBox.Checked = fToken.DifficultTerrain; OpaqueBox.Checked = fToken.Opaque; }