Changeset 373


Ignore:
Timestamp:
Apr 16, 2021, 1:36:07 PM (6 months 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.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.lfm

    r340 r373  
    196196    ItemHeight = 0
    197197    OnClick = ListClick
    198     OnKeyDown = FormKeyDown
     198    OnDblClick = StartBtnClick
     199    OnKeyPress = ListKeyPress
     200    OnKeyDown = ListKeyDown
    199201    ParentFont = False
    200202    ScrollWidth = 266
  • 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.