forked from ReClassNET/ReClass.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClassInstanceArrayNode.cs
More file actions
40 lines (34 loc) · 1.11 KB
/
Copy pathClassInstanceArrayNode.cs
File metadata and controls
40 lines (34 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.Drawing;
using ReClassNET.UI;
using ReClassNET.Util;
namespace ReClassNET.Nodes
{
public class ClassInstanceArrayNode : BaseArrayNode
{
/// <summary>Size of the node in bytes.</summary>
public override int MemorySize => InnerNode.MemorySize * Count;
public override bool PerformCycleCheck => true;
public override void Intialize()
{
InnerNode = ClassNode.Create();
InnerNode.Intialize();
}
/// <summary>Draws this node.</summary>
/// <param name="view">The view information.</param>
/// <param name="x">The x coordinate.</param>
/// <param name="y">The y coordinate.</param>
/// <returns>The pixel size the node occupies.</returns>
public override Size Draw(ViewInfo view, int x, int y)
{
return Draw(view, x, y, "Array", HotSpotType.ChangeType);
}
protected override Size DrawChild(ViewInfo view, int x, int y)
{
var v = view.Clone();
v.Address = view.Address.Add(Offset) + InnerNode.MemorySize * CurrentIndex;
v.Memory = view.Memory.Clone();
v.Memory.Offset += Offset.ToInt32() + InnerNode.MemorySize * CurrentIndex;
return InnerNode.Draw(v, x, y);
}
}
}