// Constructor public TextLabel(int capacity) { // Initialize this.text = ""; this.rect = new RectangleF(0f, 0f, 1f, 1f); this.color = new PixelColor(255, 255, 255, 255); this.backcolor = new PixelColor(0, 0, 0, 0); this.scale = 10f; this.alignx = TextAlignmentX.Left; this.aligny = TextAlignmentY.Top; this.size = new SizeF(0f, 0f); this.updateneeded = true; this.numfaces = 0; this.capacity = capacity; // Register as resource General.Map.Graphics.RegisterResource(this); // We have no destructor GC.SuppressFinalize(this); }
public TextLabel(int unused) { // Initialize this.text = ""; this.font = new Font(new FontFamily(General.Settings.TextLabelFontName), General.Settings.TextLabelFontSize, (General.Settings.TextLabelFontBold ? FontStyle.Bold : FontStyle.Regular)); // General.Settings.TextLabelFont; this.location = new Vector2D(); this.color = new PixelColor(255, 255, 255, 255); this.backcolor = new PixelColor(128, 0, 0, 0); this.alignx = TextAlignmentX.Center; this.aligny = TextAlignmentY.Top; this.textsize = SizeF.Empty; this.texturesize = Size.Empty; this.updateneeded = true; this.textureupdateneeded = true; // Register as resource General.Map.Graphics.RegisterResource(this); // We have no destructor GC.SuppressFinalize(this); }