Changeset 3 for trunk/Forms/UFormMain.pas
- Timestamp:
- Jan 27, 2016, 10:32:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r2 r3 16 16 PaintBox1: TPaintBox; 17 17 procedure FormActivate(Sender: TObject); 18 procedure FormKeyPress(Sender: TObject; var Key: char); 18 19 procedure PaintBox1Click(Sender: TObject); 20 procedure PaintBox1Paint(Sender: TObject); 19 21 private 20 22 Initialized: Boolean; … … 40 42 end; 41 43 44 procedure TFormMain.PaintBox1Paint(Sender: TObject); 45 begin 46 Core.Game.Paint(PaintBox1.Canvas); 47 end; 48 42 49 procedure TFormMain.FormActivate(Sender: TObject); 43 50 begin … … 45 52 Initialized := True; 46 53 Core.Init; 54 end; 55 end; 56 57 procedure TFormMain.FormKeyPress(Sender: TObject; var Key: char); 58 begin 59 Caption := IntToStr(Ord(Key)); 60 if Key = #63 then begin 61 Inc(Core.Game.IW); 62 core.Game.LoadData; 63 PaintBox1.Repaint; 64 end; 65 if Key = #41 then begin 66 Dec(Core.Game.IW); 67 core.Game.LoadData; 68 PaintBox1.Repaint; 47 69 end; 48 70 end;
Note:
See TracChangeset
for help on using the changeset viewer.