Ignore:
Timestamp:
Apr 2, 2021, 9:09:49 PM (3 years ago)
Author:
chronos
Message:
  • Added: Support for F11 full screen switch key in Start dialog.
  • Fixed: Allow F1 and F11 key in Start dialog even if listbox is focused.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Enhance.pas

    r330 r340  
    4848  EnhanceDlg: TEnhanceDlg;
    4949
     50
    5051implementation
    5152
    5253uses
    53   Help;
     54  Help, UKeyBindings;
    5455
    5556{$R *.lfm}
     
    231232        Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2,
    232233          1 + 2 * (xxt * 2 + 1), 1 + yyt + 12 * (yyt * 3 + 1));
    233       inc(x, xxt * 2 + 6)
     234      inc(x, xxt * 2 + 6);
    234235    end;
    235236  end;
     
    302303procedure TEnhanceDlg.CloseBtnClick(Sender: TObject);
    303304begin
    304   Close
     305  Close;
    305306end;
    306307
     
    317318begin
    318319  Page := TComponent(Sender).Tag;
    319   SmartUpdateContent
     320  SmartUpdateContent;
    320321end;
    321322
     
    337338          move(MyData.EnhancementJobs[Page, stage + 1],
    338339            MyData.EnhancementJobs[Page, stage], 4 - stage);
    339         MyData.EnhancementJobs[Page, 4] := jNone
     340        MyData.EnhancementJobs[Page, 4] := jNone;
    340341      end
    341342      else
     
    364365    begin
    365366      MyData.EnhancementJobs[Page, stage] := jRoad;
    366       inc(stage)
     367      inc(stage);
    367368    end;
    368369    if (NewJob = jFarm) and not(jIrr in Done) then
    369370    begin
    370371      MyData.EnhancementJobs[Page, stage] := jIrr;
    371       inc(stage)
    372     end;
    373     MyData.EnhancementJobs[Page, stage] := NewJob
    374   end;
    375   SmartUpdateContent
     372      inc(stage);
     373    end;
     374    MyData.EnhancementJobs[Page, stage] := NewJob;
     375  end;
     376  SmartUpdateContent;
    376377end;
    377378
    378379procedure TEnhanceDlg.FormKeyDown(Sender: TObject; var Key: Word;
    379380  Shift: TShiftState);
    380 begin
    381   if Key = VK_F1 then
     381var
     382  ShortCut: TShortCut;
     383begin
     384  ShortCut := KeyToShortCut(Key, Shift);
     385  if BHelp.Test(ShortCut) then
    382386    HelpDlg.ShowNewContent(FWindowMode or wmPersistent, hkText,
    383387      HelpDlg.TextIndex('MACRO'))
Note: See TracChangeset for help on using the changeset viewer.