-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathFQWordNode.cs
More file actions
57 lines (43 loc) · 1.57 KB
/
FQWordNode.cs
File metadata and controls
57 lines (43 loc) · 1.57 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System.Drawing;
using ReClassNET.Controls;
using ReClassNET.Nodes;
using ReClassNET.UI;
namespace UnrealEngineClassesPlugin.Nodes
{
public class FQWordNode : BaseNode
{
public override int MemorySize => 8;
public override void GetUserInterfaceInfo(out string name, out Image icon)
{
name = "FQWord";
icon = null;
}
public override Size Draw(DrawContext context, int x, int y)
{
if (IsHidden && !IsWrapped)
{
return DrawHidden(context, x, y);
}
var origX = x;
AddSelection(context, x, y, context.Font.Height);
x = AddIconPadding(context, x);
x = AddIcon(context, x, y, context.IconProvider.Class, HotSpot.NoneId, HotSpotType.None);
x = AddAddressOffset(context, x, y);
x = AddText(context, x, y, context.Settings.TypeColor, HotSpot.NoneId, "FQWord") + context.Font.Width;
x = AddText(context, x, y, context.Settings.NameColor, HotSpot.NameId, Name) + context.Font.Width;
x = AddText(context, x, y, context.Settings.NameColor, HotSpot.NoneId, "=") + context.Font.Width;
var a = context.Memory.ReadInt32(Offset);
var b = context.Memory.ReadInt32(Offset + sizeof(int));
x = AddText(context, x, y, context.Settings.ValueColor, 0, $"(A: {a}, B: {b})") + context.Font.Width;
x = AddComment(context, x, y);
DrawInvalidMemoryIndicatorIcon(context, y);
AddContextDropDownIcon(context, y);
AddDeleteIcon(context, y);
return new Size(x - origX, context.Font.Height);
}
public override int CalculateDrawnHeight(DrawContext context)
{
return IsHidden && !IsWrapped ? HiddenHeight : context.Font.Height;
}
}
}