Skip to content

Commit

Permalink
Use clearer name for face drawing method
Browse files Browse the repository at this point in the history
  • Loading branch information
ItEndsWithTens committed Jun 12, 2024
1 parent 9cf6c86 commit 9775fb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/SHME.ExternalTool/UI/BasicsTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ private void CbxReadLevelDataOnStageLoad_CheckedChanged(object sender, EventArgs

private void CmbRenderMode_SelectedIndexChanged(object sender, EventArgs e)
{
RenderAction = CmbRenderMode.SelectedIndex switch
_drawFace = CmbRenderMode.SelectedIndex switch
{
2 => DrawPoints,
1 => DrawFilled,
_ => DrawWireframe,
2 => DrawFacePoints,
1 => DrawFaceFilled,
_ => DrawFaceWireframe,
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/SHME.ExternalTool/UI/CustomMainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public void DrawGameObjects(object api, ref Matrix4x4 matrix, Point topLeft)
continue;
}

RenderAction(api, r.Tint ?? Guts.ScreenSpaceLines[0].argb);
_drawFace(api, r.Tint ?? Guts.ScreenSpaceLines[0].argb);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/SHME.ExternalTool/UI/Draw.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private Action DrawOverlay
private Action<object, Pen, int, int, int, int> _drawEllipse = null!;
private Action<object, Pen, int, int, int, int> _drawLine = null!;
private Action<object, Pen, Point[]> _drawPolygon = null!;
private Action<object, int> RenderAction = null!;
private Action<object, int> _drawFace = null!;

private static void DrawPolygonBitmap(object backend, Pen pen, Point[] visibleVertices)
{
Expand Down Expand Up @@ -67,7 +67,7 @@ private static void DrawLineGui(object backend, Pen pen, int x1, int y1, int x2,
((IGuiApi)backend).DrawLine(x1, y1, x2, y2, pen.Color);
}

private void DrawFilled(object api, int argb)
private void DrawFaceFilled(object api, int argb)
{
var visibleVertices = new Point[Guts.ScreenSpaceLines.Count * 2];

Expand All @@ -93,7 +93,7 @@ private void DrawFilled(object api, int argb)

_drawPolygon(api, Pen, visibleVertices);
}
private void DrawPoints(object api, int argb)
private void DrawFacePoints(object api, int argb)
{
for (int k = 0; k < Guts.ScreenSpaceLines.Count; k++)
{
Expand All @@ -109,7 +109,7 @@ private void DrawPoints(object api, int argb)
4);
}
}
private void DrawWireframe(object api, int argb)
private void DrawFaceWireframe(object api, int argb)
{
for (int k = 0; k < Guts.ScreenSpaceLines.Count; k++)
{
Expand Down

0 comments on commit 9775fb4

Please sign in to comment.