Changeset 292 for trunk/Start.pas


Ignore:
Timestamp:
Mar 2, 2021, 10:45:43 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Store key bindings in registry.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r290 r292  
    166166
    167167uses
    168   Global, Directories, Direct, ScreenTools, Inp, Back, Settings, UPixelPointer,
    169   UKeyBindings;
     168  Global, Directories, Direct, ScreenTools, Inp, Back, Settings, UPixelPointer;
    170169
    171170{$R *.lfm}
     
    226225  PlayerAutoDiff: array [1 .. 5] of integer = (1, 1, 2, 2, 3);
    227226  EnemyAutoDiff: array [1 .. 5] of integer = (4, 3, 2, 1, 1);
    228   KeyBindingsFileName = 'KeyBindings.txt';
    229227
    230228{ TMiniMap }
     
    438436  PlayerSlot: TPlayerSlot;
    439437  AIBrains: TBrains;
    440   KeyBindingsAbsoluteFileName: string;
    441438begin
    442439  PlayerSlots := TPlayerSlots.Create;
     
    449446  LoadConfig;
    450447  LoadAssets;
    451   KeyBindingsAbsoluteFileName := DataDir + DirectorySeparator + KeyBindingsFileName;
    452   if FileExists(KeyBindingsAbsoluteFileName) then KeyBindings.LoadFromFile(KeyBindingsAbsoluteFileName)
    453     else begin
    454       ForceDirectories(ExtractFileDir(KeyBindingsAbsoluteFileName));
    455       KeyBindings.SaveToFile(KeyBindingsAbsoluteFileName);
    456     end;
    457448
    458449  ActionsOffered := [maConfig, maManual, maCredits, maWeb];
     
    19791970  Shift: TShiftState);
    19801971begin
    1981   if KeyToShortCut(Key, Shift) = BHelp.ShortCut then
     1972  if KeyToShortCut(Key, Shift) = VK_F1 then
    19821973    DirectHelp(cStartHelp);
    19831974end;
Note: See TracChangeset for help on using the changeset viewer.