using ReClassNET.UI;
namespace ReClassNET.Nodes
{
public class Int64Node : BaseNumericNode
{
/// Size of the node in bytes.
public override int MemorySize => 8;
/// Draws this node.
/// The view information.
/// The x coordinate.
/// The y coordinate.
/// The height the node occupies.
public override int Draw(ViewInfo view, int x, int y)
{
return DrawNumeric(view, x, y, Icons.Signed, "Int64", view.Memory.ReadObject(Offset).ToString());
}
/// Updates the node from the given spot. Sets the value of the node.
/// The spot.
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);
}
}
}
}
}