33using System . Windows . Forms ;
44using ReClassNET . Extensions ;
55using ReClassNET . Native ;
6+ using ReClassNET . Project ;
67using ReClassNET . UI ;
78using ReClassNET . Util ;
89
@@ -11,14 +12,17 @@ namespace ReClassNET.Forms
1112 public partial class SettingsForm : IconForm
1213 {
1314 private readonly Settings settings ;
15+ private readonly CppTypeMapping typeMapping ;
1416
1517 public TabControl SettingsTabControl => settingsTabControl ;
1618
17- public SettingsForm ( Settings settings )
19+ public SettingsForm ( Settings settings , CppTypeMapping typeMapping )
1820 {
1921 Contract . Requires ( settings != null ) ;
22+ Contract . Requires ( typeMapping != null ) ;
2023
2124 this . settings = settings ;
25+ this . typeMapping = typeMapping ;
2226
2327 InitializeComponent ( ) ;
2428
@@ -147,52 +151,46 @@ private void SetColorBindings()
147151
148152 private void SetTypedefinitionBindings ( )
149153 {
150- paddingSettingsTextBox . Source = settings ;
151- paddingSettingsTextBox . SettingName = nameof ( Settings . TypePadding ) ;
152- boolSettingsTextBox . Source = settings ;
153- boolSettingsTextBox . SettingName = nameof ( Settings . TypeBool ) ;
154- int8SettingsTextBox . Source = settings ;
155- int8SettingsTextBox . SettingName = nameof ( Settings . TypeInt8 ) ;
156- int16SettingsTextBox . Source = settings ;
157- int16SettingsTextBox . SettingName = nameof ( Settings . TypeInt16 ) ;
158- int32SettingsTextBox . Source = settings ;
159- int32SettingsTextBox . SettingName = nameof ( Settings . TypeInt32 ) ;
160- int64SettingsTextBox . Source = settings ;
161- int64SettingsTextBox . SettingName = nameof ( Settings . TypeInt64 ) ;
162- uint8SettingsTextBox . Source = settings ;
163- uint8SettingsTextBox . SettingName = nameof ( Settings . TypeUInt8 ) ;
164- uint16SettingsTextBox . Source = settings ;
165- uint16SettingsTextBox . SettingName = nameof ( Settings . TypeUInt16 ) ;
166- uint32SettingsTextBox . Source = settings ;
167- uint32SettingsTextBox . SettingName = nameof ( Settings . TypeUInt32 ) ;
168- uint64SettingsTextBox . Source = settings ;
169- uint64SettingsTextBox . SettingName = nameof ( Settings . TypeUInt64 ) ;
170- floatSettingsTextBox . Source = settings ;
171- floatSettingsTextBox . SettingName = nameof ( Settings . TypeFloat ) ;
172- doubleSettingsTextBox . Source = settings ;
173- doubleSettingsTextBox . SettingName = nameof ( Settings . TypeDouble ) ;
174- vector2SettingsTextBox . Source = settings ;
175- vector2SettingsTextBox . SettingName = nameof ( Settings . TypeVector2 ) ;
176- vector3SettingsTextBox . Source = settings ;
177- vector3SettingsTextBox . SettingName = nameof ( Settings . TypeVector3 ) ;
178- vector4SettingsTextBox . Source = settings ;
179- vector4SettingsTextBox . SettingName = nameof ( Settings . TypeVector4 ) ;
180- matrix3x3SettingsTextBox . Source = settings ;
181- matrix3x3SettingsTextBox . SettingName = nameof ( Settings . TypeMatrix3x3 ) ;
182- matrix3x4SettingsTextBox . Source = settings ;
183- matrix3x4SettingsTextBox . SettingName = nameof ( Settings . TypeMatrix3x4 ) ;
184- matrix4x4SettingsTextBox . Source = settings ;
185- matrix4x4SettingsTextBox . SettingName = nameof ( Settings . TypeMatrix4x4 ) ;
186- utf8TextSettingsTextBox . Source = settings ;
187- utf8TextSettingsTextBox . SettingName = nameof ( Settings . TypeUTF8Text ) ;
188- utf8TextPtrSettingsTextBox . Source = settings ;
189- utf8TextPtrSettingsTextBox . SettingName = nameof ( Settings . TypeUTF8TextPtr ) ;
190- utf16TextSettingsTextBox . Source = settings ;
191- utf16TextSettingsTextBox . SettingName = nameof ( Settings . TypeUTF16Text ) ;
192- utf16TextPtrSettingsTextBox . Source = settings ;
193- utf16TextPtrSettingsTextBox . SettingName = nameof ( Settings . TypeUTF16TextPtr ) ;
194- functionPtrSettingsTextBox . Source = settings ;
195- functionPtrSettingsTextBox . SettingName = nameof ( Settings . TypeFunctionPtr ) ;
154+ boolSettingsTextBox . Source = typeMapping ;
155+ boolSettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeBool ) ;
156+ int8SettingsTextBox . Source = typeMapping ;
157+ int8SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeInt8 ) ;
158+ int16SettingsTextBox . Source = typeMapping ;
159+ int16SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeInt16 ) ;
160+ int32SettingsTextBox . Source = typeMapping ;
161+ int32SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeInt32 ) ;
162+ int64SettingsTextBox . Source = typeMapping ;
163+ int64SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeInt64 ) ;
164+ uint8SettingsTextBox . Source = typeMapping ;
165+ uint8SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeUInt8 ) ;
166+ uint16SettingsTextBox . Source = typeMapping ;
167+ uint16SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeUInt16 ) ;
168+ uint32SettingsTextBox . Source = typeMapping ;
169+ uint32SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeUInt32 ) ;
170+ uint64SettingsTextBox . Source = typeMapping ;
171+ uint64SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeUInt64 ) ;
172+ floatSettingsTextBox . Source = typeMapping ;
173+ floatSettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeFloat ) ;
174+ doubleSettingsTextBox . Source = typeMapping ;
175+ doubleSettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeDouble ) ;
176+ vector2SettingsTextBox . Source = typeMapping ;
177+ vector2SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeVector2 ) ;
178+ vector3SettingsTextBox . Source = typeMapping ;
179+ vector3SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeVector3 ) ;
180+ vector4SettingsTextBox . Source = typeMapping ;
181+ vector4SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeVector4 ) ;
182+ matrix3x3SettingsTextBox . Source = typeMapping ;
183+ matrix3x3SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeMatrix3x3 ) ;
184+ matrix3x4SettingsTextBox . Source = typeMapping ;
185+ matrix3x4SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeMatrix3x4 ) ;
186+ matrix4x4SettingsTextBox . Source = typeMapping ;
187+ matrix4x4SettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeMatrix4x4 ) ;
188+ utf8TextSettingsTextBox . Source = typeMapping ;
189+ utf8TextSettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeUtf8Text ) ;
190+ utf16TextSettingsTextBox . Source = typeMapping ;
191+ utf16TextSettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeUtf16Text ) ;
192+ functionPtrSettingsTextBox . Source = typeMapping ;
193+ functionPtrSettingsTextBox . SettingName = nameof ( CppTypeMapping . TypeFunctionPtr ) ;
196194 }
197195 }
198196}
0 commit comments