@@ -107,7 +107,14 @@ public NewAddress(Main mainForm, Section addrSection, Section baseSection, ulong
107
107
IsPointer = pointerOffsets != null ;
108
108
109
109
AddressBox . Text = Address . ToString ( "X" ) ;
110
- ScanTypeBox . SelectedIndex = ScanTypeBox . FindStringExact ( CheatType . GetDescription ( ) ) ;
110
+ foreach ( ScanType filterEnum in ( ScanType [ ] ) Enum . GetValues ( typeof ( ScanType ) ) )
111
+ {
112
+ if ( filterEnum == ScanType . Group ) continue ;
113
+ string scanTypeStr = filterEnum . GetDescription ( ) ;
114
+ ComboItem item = new ComboItem ( scanTypeStr , filterEnum ) ;
115
+ ScanTypeBox . Items . Add ( item ) ;
116
+ if ( filterEnum == CheatType ) ScanTypeBox . SelectedItem = item ;
117
+ }
111
118
ValueBox . Text = Value ;
112
119
LockBox . Checked = IsLock ;
113
120
DescriptionBox . Text = Descriptioin ;
@@ -185,22 +192,12 @@ public void ApplyUI(LanguageJson langJson)
185
192
186
193
private void NewAddress_Load ( object sender , EventArgs e )
187
194
{
188
- foreach ( ScanType filterEnum in ( ScanType [ ] ) Enum . GetValues ( typeof ( ScanType ) ) )
189
- {
190
- if ( filterEnum == ScanType . Group ) continue ;
191
- string scanTypeStr = filterEnum . GetDescription ( ) ;
192
- ComboItem item = new ComboItem ( scanTypeStr , filterEnum ) ;
193
- ScanTypeBox . Items . Add ( item ) ;
194
- if ( filterEnum == CheatType ) ScanTypeBox . SelectedItem = item ;
195
- }
195
+ if ( PointerOffsets == null || PointerOffsets . Count <= 0 ) return ;
196
196
197
- if ( PointerOffsets != null && PointerOffsets . Count > 0 )
197
+ foreach ( long offset in PointerOffsets )
198
198
{
199
- foreach ( long offset in PointerOffsets )
200
- {
201
- AddOffsetBtn . PerformClick ( ) ;
202
- TableLayoutBottomBox . Controls [ TableLayoutBottomBox . Controls . Count - 1 ] . Text = offset . ToString ( "X" ) ;
203
- }
199
+ AddOffsetBtn . PerformClick ( ) ;
200
+ TableLayoutBottomBox . Controls [ TableLayoutBottomBox . Controls . Count - 1 ] . Text = offset . ToString ( "X" ) ;
204
201
}
205
202
}
206
203
@@ -341,8 +338,7 @@ private void SetOffsetBoxs(bool isAdd)
341
338
Margin = new Padding ( 3 , 6 , 3 , 3 ) ,
342
339
ReadOnly = true ,
343
340
BorderStyle = BorderStyle . None ,
344
- } ;
345
- PointerOffsets . Add ( 0 ) ;
341
+ } ;
346
342
TableLayoutBottomBox . RowCount += 1 ;
347
343
TableLayoutBottomBox . RowStyles . Add ( new RowStyle ( SizeType . Percent , 100F ) ) ;
348
344
TableLayoutBottomBox . Controls . Add ( textBox , 0 , TableLayoutBottomBox . Controls . Count ) ;
@@ -377,6 +373,7 @@ private void ScanTypeBox_SelectedIndexChanged(object sender, EventArgs e)
377
373
ScanTypeBox . SelectedIndex = ScanTypeBox . FindStringExact ( CheatType . GetDescription ( ) ) ;
378
374
return ;
379
375
}
376
+ else if ( CheatType == ScanType . Hex && newCheatType == ScanType . Hex ) return ;
380
377
else if ( newCheatType == ScanType . String_ ) return ;
381
378
382
379
try
@@ -438,7 +435,8 @@ private void RefreshPointerChecker_Tick(object sender, EventArgs e)
438
435
439
436
if ( BaseSection == null ) break ;
440
437
441
- PointerOffsets [ idx ] = address ;
438
+ if ( TableLayoutBottomBox . Controls . Count > PointerOffsets . Count ) PointerOffsets . Add ( address ) ;
439
+ else PointerOffsets [ idx ] = address ;
442
440
443
441
if ( idx != TableLayoutBottomBox . Controls . Count - 1 )
444
442
{
0 commit comments