Changeset 14 for trunk/UMainForm.pas
- Timestamp:
- Mar 22, 2011, 6:35:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UMainForm.pas
r13 r14 1 1 unit UMainForm; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface … … 35 35 procedure AShowMapExecute(Sender: TObject); 36 36 procedure FormCreate(Sender: TObject); 37 procedure FormDeactivate(Sender: TObject); 37 38 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 38 39 procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); … … 90 91 procedure TMainForm.FormCreate(Sender: TObject); 91 92 begin 93 Application.OnDeactivate := FormDeactivate; 92 94 Randomize; 93 95 DoubleBuffered := True; … … 126 128 Engine.NewGame; 127 129 Image1Resize(Self); 130 end; 131 132 procedure TMainForm.FormDeactivate(Sender: TObject); 133 begin 134 Engine.KeyBoard.ClearAll; 128 135 end; 129 136 … … 173 180 Shift: TShiftState); 174 181 begin 175 Engine.Key State[Key] := True;182 Engine.KeyBoard.KeyState[Key] := True; 176 183 StatusBar1.Panels[0].Text := IntToStr(Key); 177 184 end; … … 180 187 ); 181 188 begin 182 Engine.Key State[Key] := False;189 Engine.KeyBoard.KeyState[Key] := False; 183 190 end; 184 191
Note:
See TracChangeset
for help on using the changeset viewer.