mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Classic modes: further text label rendering optimization.
MODELDEF parser: rewrote most of the parser logic. Now it picks actor model(s) based on Frame / FrameName properties.
This commit is contained in:
parent
bf9c3c8abe
commit
693f241202
9 changed files with 82 additions and 59 deletions
|
@ -387,6 +387,21 @@ namespace CodeImp.DoomBuilder
|
||||||
// Clean up temp file
|
// Clean up temp file
|
||||||
CleanTempFile(General.Map);
|
CleanTempFile(General.Map);
|
||||||
|
|
||||||
|
if(General.Map != null)
|
||||||
|
{
|
||||||
|
// Device reset may be needed...
|
||||||
|
if(General.Editing.Mode is ClassicMode)
|
||||||
|
{
|
||||||
|
General.Map.Graphics.Reset();
|
||||||
|
General.MainWindow.RedrawDisplay();
|
||||||
|
}
|
||||||
|
/*else if(General.Editing.Mode is VisualMode)
|
||||||
|
{
|
||||||
|
General.MainWindow.StopExclusiveMouseInput();
|
||||||
|
General.MainWindow.StartExclusiveMouseInput();
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
General.Plugins.OnMapSaveEnd(SavePurpose.Testing);
|
General.Plugins.OnMapSaveEnd(SavePurpose.Testing);
|
||||||
General.MainWindow.FocusDisplay();
|
General.MainWindow.FocusDisplay();
|
||||||
if(General.Editing.Mode is ClassicMode) General.MainWindow.RedrawDisplay();
|
if(General.Editing.Mode is ClassicMode) General.MainWindow.RedrawDisplay();
|
||||||
|
|
|
@ -1533,7 +1533,6 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
AlignX = TextAlignmentX.Center,
|
AlignX = TextAlignmentX.Center,
|
||||||
AlignY = TextAlignmentY.Middle,
|
AlignY = TextAlignmentY.Middle,
|
||||||
Color = General.Colors.WaypointColor,
|
Color = General.Colors.WaypointColor,
|
||||||
Backcolor = General.Colors.Background,
|
|
||||||
TransformCoords = true,
|
TransformCoords = true,
|
||||||
Rectangle = new RectangleF(waypoints[i].Position.x, waypoints[i].Position.y, 0.0f, 0.0f)
|
Rectangle = new RectangleF(waypoints[i].Position.x, waypoints[i].Position.y, 0.0f, 0.0f)
|
||||||
};
|
};
|
||||||
|
@ -1737,7 +1736,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
graphics.Device.SetRenderState(RenderState.FogEnable, false);
|
graphics.Device.SetRenderState(RenderState.FogEnable, false);
|
||||||
graphics.Shaders.Display2D.Texture1 = label.Texture;
|
graphics.Shaders.Display2D.Texture1 = label.Texture;
|
||||||
SetWorldTransformation(false);
|
SetWorldTransformation(false);
|
||||||
graphics.Shaders.Display2D.SetSettings(1f, 1f, 0f, 1f, true);
|
graphics.Shaders.Display2D.SetSettings(1f, 1f, 0f, 1f, false);
|
||||||
graphics.Device.SetStreamSource(0, label.VertexBuffer, 0, FlatVertex.Stride);
|
graphics.Device.SetStreamSource(0, label.VertexBuffer, 0, FlatVertex.Stride);
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
|
@ -1770,7 +1769,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
graphics.Device.SetRenderState(RenderState.TextureFactor, -1);
|
graphics.Device.SetRenderState(RenderState.TextureFactor, -1);
|
||||||
graphics.Device.SetRenderState(RenderState.FogEnable, false);
|
graphics.Device.SetRenderState(RenderState.FogEnable, false);
|
||||||
SetWorldTransformation(false);
|
SetWorldTransformation(false);
|
||||||
graphics.Shaders.Display2D.SetSettings(1f, 1f, 0f, 1f, true);
|
graphics.Shaders.Display2D.SetSettings(1f, 1f, 0f, 1f, false);
|
||||||
|
|
||||||
// Begin drawing
|
// Begin drawing
|
||||||
graphics.Shaders.Display2D.Begin();
|
graphics.Shaders.Display2D.Begin();
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
public TextAlignmentX AlignX { get { return alignx; } set { alignx = value; updateneeded = true; } }
|
public TextAlignmentX AlignX { get { return alignx; } set { alignx = value; updateneeded = true; } }
|
||||||
public TextAlignmentY AlignY { get { return aligny; } set { aligny = value; updateneeded = true; } }
|
public TextAlignmentY AlignY { get { return aligny; } set { aligny = value; updateneeded = true; } }
|
||||||
public PixelColor Color { get { return color; } set { if(!color.Equals(value)) { color = value; textureupdateneeded = true; } } }
|
public PixelColor Color { get { return color; } set { if(!color.Equals(value)) { color = value; textureupdateneeded = true; } } }
|
||||||
public PixelColor Backcolor { get { return backcolor; } set { if(!backcolor.Equals(value)) { backcolor = value; textureupdateneeded = true; } } }
|
public PixelColor BackColor { get { return backcolor; } set { if(!backcolor.Equals(value)) { backcolor = value; textureupdateneeded = true; } } }
|
||||||
public bool DrawBackground { get { return drawbg; } set { if(drawbg != value) { drawbg = value; textureupdateneeded = true; } } } //mxd
|
public bool DrawBackground { get { return drawbg; } set { if(drawbg != value) { drawbg = value; textureupdateneeded = true; } } } //mxd
|
||||||
internal Texture Texture { get { return texture; } } //mxd
|
internal Texture Texture { get { return texture; } } //mxd
|
||||||
internal VertexBuffer VertexBuffer { get { return textbuffer; } }
|
internal VertexBuffer VertexBuffer { get { return textbuffer; } }
|
||||||
|
@ -109,7 +109,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
this.font = General.Settings.TextLabelFont; //mxd
|
this.font = General.Settings.TextLabelFont; //mxd
|
||||||
this.rect = new RectangleF(0f, 0f, 1f, 1f);
|
this.rect = new RectangleF(0f, 0f, 1f, 1f);
|
||||||
this.color = new PixelColor(255, 255, 255, 255);
|
this.color = new PixelColor(255, 255, 255, 255);
|
||||||
this.backcolor = new PixelColor(255, 0, 0, 0);
|
this.backcolor = new PixelColor(128, 0, 0, 0);
|
||||||
this.alignx = TextAlignmentX.Center;
|
this.alignx = TextAlignmentX.Center;
|
||||||
this.aligny = TextAlignmentY.Top;
|
this.aligny = TextAlignmentY.Top;
|
||||||
this.textsize = new SizeF();
|
this.textsize = new SizeF();
|
||||||
|
@ -118,10 +118,6 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
|
|
||||||
// Register as resource
|
// Register as resource
|
||||||
General.Map.Graphics.RegisterResource(this);
|
General.Map.Graphics.RegisterResource(this);
|
||||||
|
|
||||||
//mxd. Create the buffer
|
|
||||||
this.textbuffer = new VertexBuffer(General.Map.Graphics.Device, 4 * FlatVertex.Stride,
|
|
||||||
Usage.Dynamic | Usage.WriteOnly, VertexFormat.None, Pool.Default);
|
|
||||||
|
|
||||||
// We have no destructor
|
// We have no destructor
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
|
@ -203,7 +199,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create label image
|
// Create label image
|
||||||
Bitmap img = CreateLabelImage(text, font, color, backcolor, drawbg);
|
Bitmap img = CreateLabelImage(text, font, alignx, aligny, color, backcolor, drawbg);
|
||||||
textsize = img.Size;
|
textsize = img.Size;
|
||||||
|
|
||||||
// Create texture
|
// Create texture
|
||||||
|
@ -234,6 +230,13 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
case TextAlignmentY.Bottom: beginy = absview.Y + absview.Height - textsize.Height; break;
|
case TextAlignmentY.Bottom: beginy = absview.Y + absview.Height - textsize.Height; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mxd. Create the buffer
|
||||||
|
if(textbuffer == null || textbuffer.Disposed)
|
||||||
|
{
|
||||||
|
textbuffer = new VertexBuffer(General.Map.Graphics.Device, 4 * FlatVertex.Stride,
|
||||||
|
Usage.Dynamic | Usage.WriteOnly, VertexFormat.None, Pool.Default);
|
||||||
|
}
|
||||||
|
|
||||||
//mxd. Lock the buffer
|
//mxd. Lock the buffer
|
||||||
using(DataStream stream = textbuffer.Lock(0, 4 * FlatVertex.Stride, LockFlags.Discard | LockFlags.NoSystemLock))
|
using(DataStream stream = textbuffer.Lock(0, 4 * FlatVertex.Stride, LockFlags.Discard | LockFlags.NoSystemLock))
|
||||||
{
|
{
|
||||||
|
@ -258,7 +261,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
private static Bitmap CreateLabelImage(string text, Font font, PixelColor color, PixelColor backcolor, bool drawbg)
|
private static Bitmap CreateLabelImage(string text, Font font, TextAlignmentX alignx, TextAlignmentY aligny, PixelColor color, PixelColor backcolor, bool drawbg)
|
||||||
{
|
{
|
||||||
PointF textorigin = new PointF(4, 3);
|
PointF textorigin = new PointF(4, 3);
|
||||||
RectangleF textrect = new RectangleF(textorigin, General.Interface.MeasureString(text, font));
|
RectangleF textrect = new RectangleF(textorigin, General.Interface.MeasureString(text, font));
|
||||||
|
@ -266,7 +269,25 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
textrect.Height = (float)Math.Round(textrect.Height);
|
textrect.Height = (float)Math.Round(textrect.Height);
|
||||||
RectangleF bgrect = new RectangleF(0, 0, textrect.Width + textorigin.X * 2, textrect.Height + textorigin.Y * 2);
|
RectangleF bgrect = new RectangleF(0, 0, textrect.Width + textorigin.X * 2, textrect.Height + textorigin.Y * 2);
|
||||||
|
|
||||||
Bitmap result = new Bitmap((int)bgrect.Width, (int)bgrect.Height);
|
// Make PO2 image, for speed and giggles...
|
||||||
|
RectangleF po2rect = new RectangleF(0, 0, General.NextPowerOf2((int)bgrect.Width), General.NextPowerOf2((int)bgrect.Height));
|
||||||
|
|
||||||
|
switch(alignx)
|
||||||
|
{
|
||||||
|
case TextAlignmentX.Center: bgrect.X = (po2rect.Width - bgrect.Width) / 2; break;
|
||||||
|
case TextAlignmentX.Right: bgrect.X = po2rect.Width - bgrect.Width; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(aligny)
|
||||||
|
{
|
||||||
|
case TextAlignmentY.Middle: bgrect.Y = (po2rect.Height - bgrect.Height) / 2; break;
|
||||||
|
case TextAlignmentY.Bottom: bgrect.Y = po2rect.Height - bgrect.Height; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
textrect.X += bgrect.X;
|
||||||
|
textrect.Y += bgrect.Y;
|
||||||
|
|
||||||
|
Bitmap result = new Bitmap((int)po2rect.Width, (int)po2rect.Height);
|
||||||
using(Graphics g = Graphics.FromImage(result))
|
using(Graphics g = Graphics.FromImage(result))
|
||||||
{
|
{
|
||||||
g.SmoothingMode = SmoothingMode.HighQuality;
|
g.SmoothingMode = SmoothingMode.HighQuality;
|
||||||
|
@ -276,7 +297,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
// Draw text
|
// Draw text
|
||||||
using(StringFormat sf = new StringFormat())
|
using(StringFormat sf = new StringFormat())
|
||||||
{
|
{
|
||||||
sf.FormatFlags = StringFormatFlags.NoWrap;
|
sf.FormatFlags = StringFormatFlags.FitBlackBox | StringFormatFlags.NoWrap;
|
||||||
sf.Alignment = StringAlignment.Center;
|
sf.Alignment = StringAlignment.Center;
|
||||||
sf.LineAlignment = StringAlignment.Center;
|
sf.LineAlignment = StringAlignment.Center;
|
||||||
|
|
||||||
|
@ -319,21 +340,20 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
using(SolidBrush brush = new SolidBrush(backcolor.ToColor()))
|
using(SolidBrush brush = new SolidBrush(backcolor.ToColor()))
|
||||||
g.DrawString(text, font, brush, textrect, sf);
|
g.DrawString(text, font, brush, textrect, sf);
|
||||||
}
|
}
|
||||||
// Draw text with outline
|
// Draw plain text
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RectangleF pathrect = textrect;
|
RectangleF plainbgrect = textrect;
|
||||||
pathrect.Inflate(1, 3);
|
if(text.Length > 1) plainbgrect.Inflate(6, 2);
|
||||||
|
|
||||||
GraphicsPath p = new GraphicsPath();
|
RectangleF plaintextrect = textrect;
|
||||||
p.AddString(text, font.FontFamily, (int)font.Style, g.DpiY * font.Size / 72f, pathrect, sf);
|
plaintextrect.Inflate(6, 4);
|
||||||
|
|
||||||
// Draw'n'fill text
|
using(SolidBrush brush = new SolidBrush(backcolor.ToColor()))
|
||||||
using(Pen pen = new Pen(backcolor.ToColor(), 3))
|
g.FillRectangle(brush, plainbgrect);
|
||||||
g.DrawPath(pen, p);
|
|
||||||
|
|
||||||
using(SolidBrush brush = new SolidBrush(color.ToColor()))
|
using(SolidBrush brush = new SolidBrush(color.ToColor()))
|
||||||
g.FillPath(brush, p);
|
g.DrawString(text, font, brush, plaintextrect, sf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,16 +205,19 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
// Constructor
|
// Constructor
|
||||||
internal MainForm()
|
internal MainForm()
|
||||||
{
|
{
|
||||||
|
// Fetch pointer
|
||||||
|
windowptr = base.Handle;
|
||||||
|
|
||||||
|
//mxd. Graphics
|
||||||
|
graphics = Graphics.FromHwndInternal(windowptr);
|
||||||
|
|
||||||
//mxd. Set DPI-aware icon size
|
//mxd. Set DPI-aware icon size
|
||||||
using(Graphics g = this.CreateGraphics())
|
DPIScaler = new SizeF(graphics.DpiX / 96, graphics.DpiY / 96);
|
||||||
{
|
|
||||||
DPIScaler = new SizeF(g.DpiX / 96, g.DpiY / 96);
|
|
||||||
|
|
||||||
if(DPIScaler.Width != 1.0f || DPIScaler.Height != 1.0f)
|
if(DPIScaler.Width != 1.0f || DPIScaler.Height != 1.0f)
|
||||||
{
|
{
|
||||||
ScaledIconSize.Width = (int)Math.Round(ScaledIconSize.Width * DPIScaler.Width);
|
ScaledIconSize.Width = (int)Math.Round(ScaledIconSize.Width * DPIScaler.Width);
|
||||||
ScaledIconSize.Height = (int)Math.Round(ScaledIconSize.Height * DPIScaler.Height);
|
ScaledIconSize.Height = (int)Math.Round(ScaledIconSize.Height * DPIScaler.Height);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup controls
|
// Setup controls
|
||||||
|
@ -235,9 +238,6 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
labelcollapsedinfo.Text = "";
|
labelcollapsedinfo.Text = "";
|
||||||
display.Dock = DockStyle.Fill;
|
display.Dock = DockStyle.Fill;
|
||||||
|
|
||||||
// Fetch pointer
|
|
||||||
windowptr = base.Handle;
|
|
||||||
|
|
||||||
// Make array for view modes
|
// Make array for view modes
|
||||||
viewmodesbuttons = new ToolStripButton[Renderer2D.NUM_VIEW_MODES];
|
viewmodesbuttons = new ToolStripButton[Renderer2D.NUM_VIEW_MODES];
|
||||||
viewmodesbuttons[(int)ViewMode.Normal] = buttonviewnormal;
|
viewmodesbuttons[(int)ViewMode.Normal] = buttonviewnormal;
|
||||||
|
@ -291,9 +291,6 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
//mxd. Hints
|
//mxd. Hints
|
||||||
hintsPanel = new HintsPanel();
|
hintsPanel = new HintsPanel();
|
||||||
hintsDocker = new Docker("hints", "Help", hintsPanel);
|
hintsDocker = new Docker("hints", "Help", hintsPanel);
|
||||||
|
|
||||||
//mxd. Graphics
|
|
||||||
graphics = Graphics.FromHwndInternal(windowptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -2669,14 +2666,14 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
private string GetDisplayFilename(string filename)
|
private string GetDisplayFilename(string filename)
|
||||||
{
|
{
|
||||||
// String doesnt fit?
|
// String doesnt fit?
|
||||||
if(GetStringWidth(filename) > MAX_RECENT_FILES_PIXELS)
|
if(MeasureString(filename, this.Font).Width > MAX_RECENT_FILES_PIXELS)
|
||||||
{
|
{
|
||||||
// Start chopping off characters
|
// Start chopping off characters
|
||||||
for(int i = filename.Length - 6; i >= 0; i--)
|
for(int i = filename.Length - 6; i >= 0; i--)
|
||||||
{
|
{
|
||||||
// Does it fit now?
|
// Does it fit now?
|
||||||
string newname = filename.Substring(0, 3) + "..." + filename.Substring(filename.Length - i, i);
|
string newname = filename.Substring(0, 3) + "..." + filename.Substring(filename.Length - i, i);
|
||||||
if(GetStringWidth(newname) <= MAX_RECENT_FILES_PIXELS) return newname;
|
if(MeasureString(newname, this.Font).Width <= MAX_RECENT_FILES_PIXELS) return newname;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cant find anything that fits (most unlikely!)
|
// Cant find anything that fits (most unlikely!)
|
||||||
|
@ -2689,14 +2686,6 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This returns the width of a string
|
|
||||||
private float GetStringWidth(string str)
|
|
||||||
{
|
|
||||||
Graphics g = Graphics.FromHwndInternal(this.Handle);
|
|
||||||
SizeF strsize = g.MeasureString(str, this.Font);
|
|
||||||
return strsize.Width;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Exit clicked
|
// Exit clicked
|
||||||
private void itemexit_Click(object sender, EventArgs e) { this.Close(); }
|
private void itemexit_Click(object sender, EventArgs e) { this.Close(); }
|
||||||
|
|
||||||
|
|
|
@ -484,7 +484,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
l.AlignX = TextAlignmentX.Center;
|
l.AlignX = TextAlignmentX.Center;
|
||||||
l.AlignY = TextAlignmentY.Middle;
|
l.AlignY = TextAlignmentY.Middle;
|
||||||
l.Color = General.Colors.InfoLine;
|
l.Color = General.Colors.InfoLine;
|
||||||
l.Backcolor = General.Colors.Background.WithAlpha(255);
|
l.BackColor = General.Colors.Background.WithAlpha(128);
|
||||||
larr[i] = l;
|
larr[i] = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,7 +519,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
l.AlignX = TextAlignmentX.Center;
|
l.AlignX = TextAlignmentX.Center;
|
||||||
l.AlignY = TextAlignmentY.Middle;
|
l.AlignY = TextAlignmentY.Middle;
|
||||||
l.Color = (linedef == highlighted ? General.Colors.Selection : General.Colors.Highlight);
|
l.Color = (linedef == highlighted ? General.Colors.Selection : General.Colors.Highlight);
|
||||||
l.Backcolor = General.Colors.Background.WithAlpha(255);
|
l.BackColor = General.Colors.Background.WithAlpha(192);
|
||||||
l.Text = (++index).ToString();
|
l.Text = (++index).ToString();
|
||||||
labels.Add(linedef, l);
|
labels.Add(linedef, l);
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
labelarray[i].AlignX = TextAlignmentX.Center;
|
labelarray[i].AlignX = TextAlignmentX.Center;
|
||||||
labelarray[i].AlignY = TextAlignmentY.Middle;
|
labelarray[i].AlignY = TextAlignmentY.Middle;
|
||||||
labelarray[i].Color = c;
|
labelarray[i].Color = c;
|
||||||
labelarray[i].Backcolor = General.Colors.Background.WithAlpha(255);
|
labelarray[i].BackColor = General.Colors.Background.WithAlpha(128);
|
||||||
}
|
}
|
||||||
labels.Add(s, labelarray);
|
labels.Add(s, labelarray);
|
||||||
}
|
}
|
||||||
|
|
|
@ -954,7 +954,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
l.AlignX = TextAlignmentX.Center;
|
l.AlignX = TextAlignmentX.Center;
|
||||||
l.AlignY = TextAlignmentY.Middle;
|
l.AlignY = TextAlignmentY.Middle;
|
||||||
l.Color = General.Colors.InfoLine;
|
l.Color = General.Colors.InfoLine;
|
||||||
l.Backcolor = General.Colors.Background.WithAlpha(255);
|
l.BackColor = General.Colors.Background.WithAlpha(128);
|
||||||
larr[i] = l;
|
larr[i] = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1000,8 +1000,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
}
|
}
|
||||||
|
|
||||||
l.Color = (thing == highlighted ? General.Colors.Selection : General.Colors.Highlight);
|
l.Color = (thing == highlighted ? General.Colors.Selection : General.Colors.Highlight);
|
||||||
l.Backcolor = General.Colors.Background.WithAlpha(255);
|
l.BackColor = General.Colors.Background.WithAlpha(192);
|
||||||
l.DrawBackground = true;
|
|
||||||
l.Text = (++index).ToString();
|
l.Text = (++index).ToString();
|
||||||
labels.Add(thing, l);
|
labels.Add(thing, l);
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
vertexnames[i].AlignX = TextAlignmentX.Center;
|
vertexnames[i].AlignX = TextAlignmentX.Center;
|
||||||
vertexnames[i].AlignY = TextAlignmentY.Middle;
|
vertexnames[i].AlignY = TextAlignmentY.Middle;
|
||||||
vertexnames[i].Color = General.Colors.Highlight.WithAlpha(255);
|
vertexnames[i].Color = General.Colors.Highlight.WithAlpha(255);
|
||||||
vertexnames[i].Backcolor = General.Colors.Background.WithAlpha(255);
|
|
||||||
}
|
}
|
||||||
points = new List<DrawnVertex>();
|
points = new List<DrawnVertex>();
|
||||||
overgroups = new List<int>();
|
overgroups = new List<int>();
|
||||||
|
|
|
@ -103,12 +103,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// Initialization
|
// Initialization
|
||||||
private void Initialize()
|
private void Initialize()
|
||||||
{
|
{
|
||||||
label = new TextLabel();
|
label = new TextLabel
|
||||||
label.AlignX = TextAlignmentX.Center;
|
{
|
||||||
label.AlignY = TextAlignmentY.Middle;
|
AlignX = TextAlignmentX.Center,
|
||||||
label.Color = General.Colors.Highlight;
|
AlignY = TextAlignmentY.Middle,
|
||||||
label.Backcolor = General.Colors.Background;
|
Color = General.Colors.Highlight,
|
||||||
label.TransformCoords = true;
|
BackColor = General.Colors.Background.WithAlpha(64),
|
||||||
|
TransformCoords = true,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disposer
|
// Disposer
|
||||||
|
|
Loading…
Reference in a new issue