-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathArrayNode.cs
More file actions
40 lines (34 loc) · 982 Bytes
/
ArrayNode.cs
File metadata and controls
40 lines (34 loc) · 982 Bytes
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;
using System.Drawing;
using ReClassNET.Controls;
namespace ReClassNET.Nodes
{
public class ArrayNode : BaseWrapperArrayNode
{
public ArrayNode()
{
IsReadOnly = false;
}
public override void GetUserInterfaceInfo(out string name, out Image icon)
{
name = "Array";
icon = Properties.Resources.B16x16_Button_Array;
}
public override void Initialize()
{
ChangeInnerNode(IntPtr.Size == 4 ? (BaseNode)new Hex32Node() : new Hex64Node());
}
public override Size Draw(DrawContext context, int x, int y)
{
return Draw(context, x, y, "Array");
}
protected override Size DrawChild(DrawContext context, int x, int y)
{
var innerContext = context.Clone();
innerContext.Address = context.Address + Offset + InnerNode.MemorySize * CurrentIndex;
innerContext.Memory = context.Memory.Clone();
innerContext.Memory.Offset += Offset + InnerNode.MemorySize * CurrentIndex;
return InnerNode.Draw(innerContext, x, y);
}
}
}