Changeset 261 for trunk/Start.pas
- Timestamp:
- Jun 11, 2020, 12:40:26 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Start.pas
r259 r261 165 165 166 166 uses 167 Global, Directories, Direct, ScreenTools, Inp, Back, Settings, UPixelPointer; 167 Global, Directories, Direct, ScreenTools, Inp, Back, Settings, UPixelPointer, 168 UKeyBindings; 168 169 169 170 {$R *.lfm} … … 224 225 PlayerAutoDiff: array [1 .. 5] of integer = (1, 1, 2, 2, 3); 225 226 EnemyAutoDiff: array [1 .. 5] of integer = (4, 3, 2, 1, 1); 227 KeyBindingsFileName = 'KeyBindings.txt'; 226 228 227 229 { TMiniMap } … … 435 437 PlayerSlot: TPlayerSlot; 436 438 AIBrains: TBrains; 439 KeyBindingsAbsoluteFileName: string; 437 440 begin 438 441 PlayerSlots := TPlayerSlots.Create; … … 445 448 LoadConfig; 446 449 LoadAssets; 450 KeyBindingsAbsoluteFileName := DataDir + DirectorySeparator + KeyBindingsFileName; 451 if FileExists(KeyBindingsAbsoluteFileName) then KeyBindings.LoadFromFile(KeyBindingsAbsoluteFileName) 452 else begin 453 ForceDirectories(ExtractFileDir(KeyBindingsAbsoluteFileName)); 454 KeyBindings.SaveToFile(KeyBindingsAbsoluteFileName); 455 end; 447 456 448 457 ActionsOffered := [maConfig, maManual, maCredits, maWeb]; … … 1963 1972 Shift: TShiftState); 1964 1973 begin 1965 if (Shift = []) and (Key = VK_F1)then1974 if KeyToShortCut(Key, Shift) = BHelp.ShortCut then 1966 1975 DirectHelp(cStartHelp); 1967 1976 end;
Note:
See TracChangeset
for help on using the changeset viewer.