Changeset 416 for trunk/Settings.pas
- Timestamp:
- Nov 17, 2021, 10:47:48 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Settings.pas
r408 r416 58 58 {$R *.lfm} 59 59 60 uses 61 Start; 62 60 63 var 61 64 SFullScreen, SGamma, SRestartMsg, SShortCutPrimary, SShortCutSecondary, … … 193 196 begin 194 197 ReloadLanguages; 195 Languages.LoadToStrings(ListLanguages.Items);198 StartDlg.Translator.LanguageListToStrings(ListLanguages.Items); 196 199 ListLanguages.Font.Color := MainTexture.ColorMark; 197 200 ListKeyBindings.Font.Color := MainTexture.ColorMark; … … 260 263 procedure TSettingsDlg.LoadData; 261 264 begin 262 ListLanguages.ItemIndex := Languages.Search(LocaleCode); 263 if (ListLanguages.ItemIndex = -1) and (Languages.Count > 0) then 264 ListLanguages.ItemIndex := 0; 265 StartDlg.Translator.Language := StartDlg.Translator.Languages.SearchByCode(LocaleCode); 266 StartDlg.Translator.LanguageListToStrings(ListLanguages.Items, False); 267 ListLanguages.ItemIndex := ListLanguages.Items.IndexOfObject(StartDlg.Translator.Language); 268 if ListLanguages.ItemIndex = -1 then ListLanguages.ItemIndex := 0; 265 269 if FullScreen then ButtonFullscreen.ButtonIndex := 3 266 270 else ButtonFullscreen.ButtonIndex := 2; … … 274 278 begin 275 279 NeedRestart := Gamma <> LocalGamma; 276 LocaleCode := Languages[ListLanguages.ItemIndex].ShortName; 280 if ListLanguages.ItemIndex <> -1 then begin 281 StartDlg.Translator.Language := TLanguage(ListLanguages.Items.Objects[ListLanguages.ItemIndex]); 282 LocaleCode := StartDlg.Translator.Language.Code; 283 end else begin 284 StartDlg.Translator.Language := nil; 285 LocaleCode := ''; 286 end; 277 287 FullScreen := (ButtonFullscreen.ButtonIndex and 1) = 1; 278 288 Gamma := LocalGamma;
Note:
See TracChangeset
for help on using the changeset viewer.