-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameOver.pas
52 lines (41 loc) · 1.01 KB
/
GameOver.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
unit GameOver;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
type
TForm2 = class(TForm)
OK: TButton;
Panel1: TPanel;
Menü: TButton;
procedure OKClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure MenüClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
Uses Unit1;
{$R *.dfm}
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
OKClick(Sender);
end;
procedure TForm2.FormShow(Sender: TObject);
begin Panel1.Caption := 'Score: '+Inttostr(Unit1.SCORE);
end;
procedure TForm2.MenüClick(Sender: TObject);
begin
self.close;
Form1.Button1Click(Sender); // spart schreibarbeit
end;
procedure TForm2.OKClick(Sender: TObject);
begin
self.Close;
end;
end.