forked from ReClassNET/ReClass.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUInt32Node.cs
More file actions
34 lines (29 loc) · 693 Bytes
/
Copy pathUInt32Node.cs
File metadata and controls
34 lines (29 loc) · 693 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
using System.Drawing;
using ReClassNET.Memory;
using ReClassNET.UI;
namespace ReClassNET.Nodes
{
public class UInt32Node : BaseNumericNode
{
public override int MemorySize => 4;
public override Size Draw(ViewInfo view, int x, int y)
{
return DrawNumeric(view, x, y, Icons.Unsigned, "UInt32", ReadValueFromMemory(view.Memory).ToString());
}
public override void Update(HotSpot spot)
{
base.Update(spot);
if (spot.Id == 0)
{
if (uint.TryParse(spot.Text, out var val))
{
spot.Memory.Process.WriteRemoteMemory(spot.Address, val);
}
}
}
public uint ReadValueFromMemory(MemoryBuffer memory)
{
return memory.ReadUInt32(Offset);
}
}
}