Fixed the rendering of MaskRemove notes.

This commit is contained in:
Zsolt Zitting
2022-11-13 16:02:33 -07:00
parent 0156e36bfc
commit d7cc20d96f
+8 -1
View File
@@ -28,6 +28,7 @@ namespace BAKKA_Editor
public Pen TickMajorPen { get; set; }
public SolidBrush HoldBrush { get; set; } = new SolidBrush(Color.FromArgb(170, Color.Yellow));
public SolidBrush MaskBrush { get; set; } = new SolidBrush(Color.DimGray);
public SolidBrush BackgroundBrush { get; set; }
public Pen HighlightPen { get; set; }
public Pen FlairPen { get; set; }
private int CursorTransparency = 110;
@@ -162,8 +163,10 @@ namespace BAKKA_Editor
// Set drawing mode
bufGraphics.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;
// Remember background color
BackgroundBrush = new SolidBrush(color);
// Draw background
bufGraphics.Graphics.FillRectangle(new SolidBrush(color), panelRect);
bufGraphics.Graphics.FillRectangle(BackgroundBrush, panelRect);
}
public void DrawMasks(Chart chart)
@@ -181,6 +184,10 @@ namespace BAKKA_Editor
if (rem == null || rem.Measure < mask.Measure)
bufGraphics.Graphics.FillPie(MaskBrush, DrawRect.ToInt(), -mask.Position * 6.0f, -mask.Size * 6.0f);
}
else if (mask.NoteType == NoteType.MaskRemove) // Explicitly draw MaskRemove for edge cases
{
bufGraphics.Graphics.FillPie(BackgroundBrush, DrawRect.ToInt(), -mask.Position * 6.0f, -mask.Size * 6.0f);
}
}
}