Changeset 292 for trunk/Start.pas
- Timestamp:
- Mar 2, 2021, 10:45:43 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Start.pas
r290 r292 166 166 167 167 uses 168 Global, Directories, Direct, ScreenTools, Inp, Back, Settings, UPixelPointer, 169 UKeyBindings; 168 Global, Directories, Direct, ScreenTools, Inp, Back, Settings, UPixelPointer; 170 169 171 170 {$R *.lfm} … … 226 225 PlayerAutoDiff: array [1 .. 5] of integer = (1, 1, 2, 2, 3); 227 226 EnemyAutoDiff: array [1 .. 5] of integer = (4, 3, 2, 1, 1); 228 KeyBindingsFileName = 'KeyBindings.txt';229 227 230 228 { TMiniMap } … … 438 436 PlayerSlot: TPlayerSlot; 439 437 AIBrains: TBrains; 440 KeyBindingsAbsoluteFileName: string;441 438 begin 442 439 PlayerSlots := TPlayerSlots.Create; … … 449 446 LoadConfig; 450 447 LoadAssets; 451 KeyBindingsAbsoluteFileName := DataDir + DirectorySeparator + KeyBindingsFileName;452 if FileExists(KeyBindingsAbsoluteFileName) then KeyBindings.LoadFromFile(KeyBindingsAbsoluteFileName)453 else begin454 ForceDirectories(ExtractFileDir(KeyBindingsAbsoluteFileName));455 KeyBindings.SaveToFile(KeyBindingsAbsoluteFileName);456 end;457 448 458 449 ActionsOffered := [maConfig, maManual, maCredits, maWeb]; … … 1979 1970 Shift: TShiftState); 1980 1971 begin 1981 if KeyToShortCut(Key, Shift) = BHelp.ShortCutthen1972 if KeyToShortCut(Key, Shift) = VK_F1 then 1982 1973 DirectHelp(cStartHelp); 1983 1974 end;
Note:
See TracChangeset
for help on using the changeset viewer.