Changeset 257


Ignore:
Timestamp:
Jun 10, 2020, 9:47:11 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Allow to close windows by Escape key.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Enhance.pas

    r188 r257  
    366366  Shift: TShiftState);
    367367begin
    368   if Key = VK_ESCAPE then
    369     Close
    370   else if Key = VK_F1 then
     368  if Key = VK_F1 then
    371369    HelpDlg.ShowNewContent(FWindowMode or wmPersistent, hkText,
    372370      HelpDlg.TextIndex('MACRO'))
  • trunk/LocalPlayer/TechTree.pas

    r220 r257  
    2323      Shift: TShiftState; X, Y: Integer);
    2424    procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
    25     procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    2625    procedure CloseBtnClick(Sender: TObject);
    2726  private
     
    228227end;
    229228
    230 procedure TTechTreeDlg.FormKeyDown(Sender: TObject; var Key: Word;
    231   Shift: TShiftState);
    232 begin
    233   if Key = VK_ESCAPE then
    234     Close;
    235 end;
    236 
    237229procedure TTechTreeDlg.CloseBtnClick(Sender: TObject);
    238230begin
  • trunk/Packages/CevoComponents/DrawDlg.pas

    r229 r257  
    2929    procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
    3030    procedure MouseLeave; override;
     31    procedure KeyDown(var Key: Word; Shift: TShiftState); override;
    3132  public
    3233    constructor Create(AOwner: TComponent); override;
     
    171172end;
    172173
     174procedure TDrawDlg.KeyDown(var Key: Word; Shift: TShiftState);
     175begin
     176  if Key = VK_ESCAPE then Close;
     177  inherited KeyDown(Key, Shift);
     178end;
     179
    173180procedure TDrawDlg.VisibleChangedHandler(Sender: TObject);
    174181begin
Note: See TracChangeset for help on using the changeset viewer.