forked from ReClassNET/ReClass.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVMethodNode.cs
More file actions
29 lines (25 loc) · 782 Bytes
/
Copy pathVMethodNode.cs
File metadata and controls
29 lines (25 loc) · 782 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
using System;
using System.Diagnostics.Contracts;
using System.Drawing;
using ReClassNET.UI;
namespace ReClassNET.Nodes
{
public class VMethodNode : BaseFunctionPtrNode
{
public string MethodName => string.IsNullOrEmpty(Name) ? $"Function{Offset.ToInt32() / IntPtr.Size}" : Name;
public VMethodNode()
{
Contract.Ensures(Name != null);
Name = string.Empty;
}
/// <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 pixel size the node occupies.</returns>
public override Size Draw(ViewInfo view, int x, int y)
{
return Draw(view, x, y, $"({Offset.ToInt32() / IntPtr.Size})", MethodName);
}
}
}