Skip to content

Commit ac48f42

Browse files
committed
Changed draw callback signature.
1 parent d7dbe8f commit ac48f42

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

Nodes/BaseMatrixNode.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ namespace ReClassNET.Nodes
55
{
66
public abstract class BaseMatrixNode : BaseNode
77
{
8-
public BaseMatrixNode()
8+
protected BaseMatrixNode()
99
{
1010
levelsOpen.DefaultValue = true;
1111
}
1212

13-
protected delegate void DrawMatrixValues(ref int x, ref int y, int defaultX);
13+
protected delegate void DrawMatrixValues(int x, ref int y);
1414

1515
protected int DrawMatrixType(ViewInfo view, int x, int y, string type, DrawMatrixValues drawValues)
1616
{
@@ -45,7 +45,7 @@ protected int DrawMatrixType(ViewInfo view, int x, int y, string type, DrawMatri
4545

4646
if (levelsOpen[view.Level])
4747
{
48-
drawValues(ref x, ref y, tx);
48+
drawValues(tx, ref y);
4949
}
5050

5151
return y + view.Font.Height;

Nodes/Matrix3x3Node.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,24 @@ struct Matrix3x3Data
3434

3535
/// <summary>Draws this node.</summary>
3636
/// <param name="view">The view information.</param>
37-
/// <param name="x">The x coordinate.</param>
38-
/// <param name="y">The y coordinate.</param>
37+
/// <param name="x2">The x coordinate.</param>
38+
/// <param name="y2">The y coordinate.</param>
3939
/// <returns>The height the node occupies.</returns>
4040
public override int Draw(ViewInfo view, int x2, int y2)
4141
{
42-
return DrawMatrixType(view, x2, y2, "Matrix (3x3)", (ref int x, ref int y, int defaultX) =>
42+
return DrawMatrixType(view, x2, y2, "Matrix (3x3)", (int defaultX, ref int y) =>
4343
{
4444
var value = view.Memory.ReadObject<Matrix3x3Data>(Offset);
4545

4646
y += view.Font.Height;
47-
x = defaultX;
47+
var x = defaultX;
4848
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
4949
x = AddText(view, x, y, view.Settings.ValueColor, 0, $"{value._11,14:0.000}");
5050
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
5151
x = AddText(view, x, y, view.Settings.ValueColor, 1, $"{value._12,14:0.000}");
5252
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
5353
x = AddText(view, x, y, view.Settings.ValueColor, 2, $"{value._13,14:0.000}");
54-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
54+
AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
5555

5656
y += view.Font.Height;
5757
x = defaultX;
@@ -61,7 +61,7 @@ public override int Draw(ViewInfo view, int x2, int y2)
6161
x = AddText(view, x, y, view.Settings.ValueColor, 4, $"{value._22,14:0.000}");
6262
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
6363
x = AddText(view, x, y, view.Settings.ValueColor, 5, $"{value._23,14:0.000}");
64-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
64+
AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
6565

6666
y += view.Font.Height;
6767
x = defaultX;

Nodes/Matrix3x4Node.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ struct Matrix3x4Data
3939

4040
/// <summary>Draws this node.</summary>
4141
/// <param name="view">The view information.</param>
42-
/// <param name="x">The x coordinate.</param>
43-
/// <param name="y">The y coordinate.</param>
42+
/// <param name="x2">The x coordinate.</param>
43+
/// <param name="y2">The y coordinate.</param>
4444
/// <returns>The height the node occupies.</returns>
4545
public override int Draw(ViewInfo view, int x2, int y2)
4646
{
47-
return DrawMatrixType(view, x2, y2, "Matrix (3x4)", (ref int x, ref int y, int defaultX) =>
47+
return DrawMatrixType(view, x2, y2, "Matrix (3x4)", (int defaultX, ref int y) =>
4848
{
4949
var value = view.Memory.ReadObject<Matrix3x4Data>(Offset);
5050

5151
y += view.Font.Height;
52-
x = defaultX;
52+
var x = defaultX;
5353
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
5454
x = AddText(view, x, y, view.Settings.ValueColor, 0, $"{value._11,14:0.000}");
5555
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
@@ -58,7 +58,7 @@ public override int Draw(ViewInfo view, int x2, int y2)
5858
x = AddText(view, x, y, view.Settings.ValueColor, 2, $"{value._13,14:0.000}");
5959
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
6060
x = AddText(view, x, y, view.Settings.ValueColor, 3, $"{value._14,14:0.000}");
61-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
61+
AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
6262

6363
y += view.Font.Height;
6464
x = defaultX;
@@ -70,7 +70,7 @@ public override int Draw(ViewInfo view, int x2, int y2)
7070
x = AddText(view, x, y, view.Settings.ValueColor, 6, $"{value._23,14:0.000}");
7171
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
7272
x = AddText(view, x, y, view.Settings.ValueColor, 7, $"{value._24,14:0.000}");
73-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
73+
AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
7474

7575
y += view.Font.Height;
7676
x = defaultX;

Nodes/Matrix4x4Node.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ struct Matrix4x4Data
4747

4848
/// <summary>Draws this node.</summary>
4949
/// <param name="view">The view information.</param>
50-
/// <param name="x">The x coordinate.</param>
51-
/// <param name="y">The y coordinate.</param>
50+
/// <param name="x2">The x coordinate.</param>
51+
/// <param name="y2">The y coordinate.</param>
5252
/// <returns>The height the node occupies.</returns>
5353
public override int Draw(ViewInfo view, int x2, int y2)
5454
{
55-
return DrawMatrixType(view, x2, y2, "Matrix (4x4)", (ref int x, ref int y, int defaultX) =>
55+
return DrawMatrixType(view, x2, y2, "Matrix (4x4)", (int defaultX, ref int y) =>
5656
{
5757
var value = view.Memory.ReadObject<Matrix4x4Data>(Offset);
5858

5959
y += view.Font.Height;
60-
x = defaultX;
60+
var x = defaultX;
6161
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
6262
x = AddText(view, x, y, view.Settings.ValueColor, 0, $"{value._11,14:0.000}");
6363
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");

0 commit comments

Comments
 (0)