Ignore:
Timestamp:
Nov 5, 2014, 11:02:00 PM (10 years ago)
Author:
chronos
Message:
  • Modified: If Ctrl key is released then deselect currently selected player cell.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r85 r86  
    7575    procedure FormCreate(Sender: TObject);
    7676    procedure FormDestroy(Sender: TObject);
     77    procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
    7778    procedure FormShow(Sender: TObject);
    7879    procedure MenuItem19Click(Sender: TObject);
     
    305306end;
    306307
     308procedure TFormMain.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState
     309  );
     310begin
     311  if (Key = 27) or (Key = 17) then
     312  if Assigned(Core.Game.CurrentPlayer) then begin
     313    Core.Game.CurrentPlayer.View.SelectedCell := nil;
     314    Redraw;
     315  end;
     316end;
     317
    307318procedure TFormMain.FormShow(Sender: TObject);
    308319begin
Note: See TracChangeset for help on using the changeset viewer.