11using System ;
22using System . Drawing ;
3+ using ReClassNET . Controls ;
34using ReClassNET . Extensions ;
45using ReClassNET . Memory ;
56using ReClassNET . Nodes ;
@@ -29,57 +30,57 @@ public override void Initialize()
2930 ChangeInnerNode ( node ) ;
3031 }
3132
32- public override Size Draw ( ViewInfo view , int x , int y )
33+ public override Size Draw ( DrawContext context , int x , int y )
3334 {
3435 if ( IsHidden && ! IsWrapped )
3536 {
36- return DrawHidden ( view , x , y ) ;
37+ return DrawHidden ( context , x , y ) ;
3738 }
3839
3940 var origX = x ;
4041 var origY = y ;
4142
42- AddSelection ( view , x , y , view . Font . Height ) ;
43+ AddSelection ( context , x , y , context . Font . Height ) ;
4344
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 ) ;
4647
4748 var tx = x ;
48- x = AddAddressOffset ( view , x , y ) ;
49+ x = AddAddressOffset ( context , x , y ) ;
4950
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 ) ;
5455
55- x += view . Font . Width ;
56+ x += context . Font . Width ;
5657
57- AddComment ( view , x , y ) ;
58+ AddComment ( context , x , y ) ;
5859
59- DrawInvalidMemoryIndicatorIcon ( view , y ) ;
60- AddContextDropDownIcon ( view , y ) ;
61- AddDeleteIcon ( view , y ) ;
60+ DrawInvalidMemoryIndicatorIcon ( context , y ) ;
61+ AddContextDropDownIcon ( context , y ) ;
62+ AddDeleteIcon ( context , y ) ;
6263
63- y += view . Font . Height ;
64+ y += context . Font . Height ;
6465
6566 var size = new Size ( x - origX , y - origY ) ;
6667
67- if ( LevelsOpen [ view . Level ] )
68+ if ( LevelsOpen [ context . Level ] )
6869 {
69- var ptr = view . Memory . ReadObject < IntPtr > ( Offset ) ;
70+ var ptr = context . Memory . ReadObject < IntPtr > ( Offset ) ;
7071 if ( ! ptr . IsNull ( ) )
7172 {
72- ptr = view . Process . ReadRemoteObject < IntPtr > ( ptr ) ;
73+ ptr = context . Process . ReadRemoteObject < IntPtr > ( ptr ) ;
7374 if ( ! ptr . IsNull ( ) )
7475 {
7576 ptr -= IntPtr . Size ;
7677 }
7778 }
7879
7980 memory . Size = InnerNode . MemorySize ;
80- memory . UpdateFrom ( view . Process , ptr ) ;
81+ memory . UpdateFrom ( context . Process , ptr ) ;
8182
82- var v = view . Clone ( ) ;
83+ var v = context . Clone ( ) ;
8384 v . Address = ptr ;
8485 v . Memory = memory ;
8586
@@ -92,17 +93,17 @@ public override Size Draw(ViewInfo view, int x, int y)
9293 return size ;
9394 }
9495
95- public override int CalculateDrawnHeight ( ViewInfo view )
96+ public override int CalculateDrawnHeight ( DrawContext context )
9697 {
9798 if ( IsHidden && ! IsWrapped )
9899 {
99100 return HiddenHeight ;
100101 }
101102
102- var h = view . Font . Height ;
103- if ( LevelsOpen [ view . Level ] )
103+ var h = context . Font . Height ;
104+ if ( LevelsOpen [ context . Level ] )
104105 {
105- h += InnerNode . CalculateDrawnHeight ( view ) ;
106+ h += InnerNode . CalculateDrawnHeight ( context ) ;
106107 }
107108 return h ;
108109 }
0 commit comments