forked from ReClassNET/ReClass.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInt64Node.cs
More file actions
36 lines (32 loc) · 988 Bytes
/
Int64Node.cs
File metadata and controls
36 lines (32 loc) · 988 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
using ReClassNET.UI;
namespace ReClassNET.Nodes
{
public class Int64Node : BaseNumericNode
{
/// <summary>Size of the node in bytes.</summary>
public override int MemorySize => 8;
/// <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 height the node occupies.</returns>
public override int Draw(ViewInfo view, int x, int y)
{
return DrawNumeric(view, x, y, Icons.Signed, "Int64", view.Memory.ReadObject<long>(Offset).ToString());
}
/// <summary>Updates the node from the given spot. Sets the value of the node.</summary>
/// <param name="spot">The spot.</param>
public override void Update(HotSpot spot)
{
base.Update(spot);
if (spot.Id == 0)
{
long val;
if (long.TryParse(spot.Text, out val))
{
spot.Memory.Process.WriteRemoteMemory(spot.Address, val);
}
}
}
}
}