1
1
using System ;
2
2
using System . Drawing ;
3
+ using ReClassNET . Controls ;
3
4
using ReClassNET . Extensions ;
4
5
using ReClassNET . Memory ;
5
6
using ReClassNET . Nodes ;
@@ -29,57 +30,57 @@ public override void Initialize()
29
30
ChangeInnerNode ( node ) ;
30
31
}
31
32
32
- public override Size Draw ( ViewInfo view , int x , int y )
33
+ public override Size Draw ( DrawContext context , int x , int y )
33
34
{
34
35
if ( IsHidden && ! IsWrapped )
35
36
{
36
- return DrawHidden ( view , x , y ) ;
37
+ return DrawHidden ( context , x , y ) ;
37
38
}
38
39
39
40
var origX = x ;
40
41
var origY = y ;
41
42
42
- AddSelection ( view , x , y , view . Font . Height ) ;
43
+ AddSelection ( context , x , y , context . Font . Height ) ;
43
44
44
- x = AddOpenCloseIcon ( view , x , y ) ;
45
- x = AddIcon ( view , x , y , Icons . Pointer , - 1 , HotSpotType . None ) ;
45
+ x = AddOpenCloseIcon ( context , x , y ) ;
46
+ x = AddIcon ( context , x , y , context . IconProvider . Pointer , - 1 , HotSpotType . None ) ;
46
47
47
48
var tx = x ;
48
- x = AddAddressOffset ( view , x , y ) ;
49
+ x = AddAddressOffset ( context , x , y ) ;
49
50
50
- x = AddText ( view , x , y , view . Settings . TypeColor , HotSpot . NoneId , "WeakPtr" ) + view . Font . Width ;
51
- x = AddText ( view , x , y , view . Settings . NameColor , HotSpot . NameId , Name ) + view . Font . Width ;
52
- x = AddText ( view , x , y , view . Settings . ValueColor , HotSpot . NoneId , $ "<{ InnerNode . Name } >") ;
53
- x = AddIcon ( view , x , y , Icons . Change , 4 , HotSpotType . ChangeClassType ) ;
51
+ x = AddText ( context , x , y , context . Settings . TypeColor , HotSpot . NoneId , "WeakPtr" ) + context . Font . Width ;
52
+ x = AddText ( context , x , y , context . Settings . NameColor , HotSpot . NameId , Name ) + context . Font . Width ;
53
+ x = AddText ( context , x , y , context . Settings . ValueColor , HotSpot . NoneId , $ "<{ InnerNode . Name } >") ;
54
+ x = AddIcon ( context , x , y , context . IconProvider . Change , 4 , HotSpotType . ChangeClassType ) ;
54
55
55
- x += view . Font . Width ;
56
+ x += context . Font . Width ;
56
57
57
- AddComment ( view , x , y ) ;
58
+ AddComment ( context , x , y ) ;
58
59
59
- DrawInvalidMemoryIndicatorIcon ( view , y ) ;
60
- AddContextDropDownIcon ( view , y ) ;
61
- AddDeleteIcon ( view , y ) ;
60
+ DrawInvalidMemoryIndicatorIcon ( context , y ) ;
61
+ AddContextDropDownIcon ( context , y ) ;
62
+ AddDeleteIcon ( context , y ) ;
62
63
63
- y += view . Font . Height ;
64
+ y += context . Font . Height ;
64
65
65
66
var size = new Size ( x - origX , y - origY ) ;
66
67
67
- if ( LevelsOpen [ view . Level ] )
68
+ if ( LevelsOpen [ context . Level ] )
68
69
{
69
- var ptr = view . Memory . ReadObject < IntPtr > ( Offset ) ;
70
+ var ptr = context . Memory . ReadObject < IntPtr > ( Offset ) ;
70
71
if ( ! ptr . IsNull ( ) )
71
72
{
72
- ptr = view . Process . ReadRemoteObject < IntPtr > ( ptr ) ;
73
+ ptr = context . Process . ReadRemoteObject < IntPtr > ( ptr ) ;
73
74
if ( ! ptr . IsNull ( ) )
74
75
{
75
76
ptr -= IntPtr . Size ;
76
77
}
77
78
}
78
79
79
80
memory . Size = InnerNode . MemorySize ;
80
- memory . UpdateFrom ( view . Process , ptr ) ;
81
+ memory . UpdateFrom ( context . Process , ptr ) ;
81
82
82
- var v = view . Clone ( ) ;
83
+ var v = context . Clone ( ) ;
83
84
v . Address = ptr ;
84
85
v . Memory = memory ;
85
86
@@ -92,17 +93,17 @@ public override Size Draw(ViewInfo view, int x, int y)
92
93
return size ;
93
94
}
94
95
95
- public override int CalculateDrawnHeight ( ViewInfo view )
96
+ public override int CalculateDrawnHeight ( DrawContext context )
96
97
{
97
98
if ( IsHidden && ! IsWrapped )
98
99
{
99
100
return HiddenHeight ;
100
101
}
101
102
102
- var h = view . Font . Height ;
103
- if ( LevelsOpen [ view . Level ] )
103
+ var h = context . Font . Height ;
104
+ if ( LevelsOpen [ context . Level ] )
104
105
{
105
- h += InnerNode . CalculateDrawnHeight ( view ) ;
106
+ h += InnerNode . CalculateDrawnHeight ( context ) ;
106
107
}
107
108
return h ;
108
109
}
0 commit comments