-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathHex8Node.cs
More file actions
34 lines (28 loc) · 796 Bytes
/
Hex8Node.cs
File metadata and controls
34 lines (28 loc) · 796 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.Controls;
using ReClassNET.UI;
namespace ReClassNET.Nodes
{
public class Hex8Node : BaseHexNode
{
public override int MemorySize => 1;
public override void GetUserInterfaceInfo(out string name, out Image icon)
{
name = "Hex8";
icon = Properties.Resources.B16x16_Button_Hex_8;
}
public override string GetToolTipText(HotSpot spot)
{
var b = spot.Memory.ReadUInt8(Offset);
return $"Int8: {(int)b}\nUInt8: 0x{b:X02}";
}
public override Size Draw(DrawContext context, int x, int y)
{
return Draw(context, x, y, context.Settings.ShowNodeText ? context.Memory.ReadString(context.Settings.RawDataEncoding, Offset, 1) + " " : null, 1);
}
public override void Update(HotSpot spot)
{
Update(spot, 1);
}
}
}