Changeset 373 for trunk/Start.pas


Ignore:
Timestamp:
Apr 16, 2021, 1:36:07 PM (4 years ago)
Author:
chronos
Message:
  • Added: Open game or editor map by mouse double click or by pressing Enter key.
  • Added: Delete game or editor map by pressing Del key.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r367 r373  
    5757    AutoEnemyDownBtn: TButtonC;
    5858    ReplayBtn: TButtonB;
     59    procedure ListKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
     60    procedure ListKeyPress(Sender: TObject; var Key: char);
    5961    procedure StartBtnClick(Sender: TObject);
    6062    procedure FormPaint(Sender: TObject);
     
    10491051      end;
    10501052  end;
     1053end;
     1054
     1055procedure TStartDlg.ListKeyPress(Sender: TObject; var Key: char);
     1056begin
     1057  if Key = #13 then StartBtnClick(Sender);
     1058end;
     1059
     1060procedure TStartDlg.ListKeyDown(Sender: TObject; var Key: Word;
     1061  Shift: TShiftState);
     1062const
     1063  DelKey = 46;
     1064begin
     1065  if Key = DelKey then DeleteBtnClick(Sender)
     1066    else FormKeyDown(Sender, Key, Shift);
    10511067end;
    10521068
Note: See TracChangeset for help on using the changeset viewer.