-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnit2.pas
More file actions
56 lines (41 loc) · 1.02 KB
/
Copy pathUnit2.pas
File metadata and controls
56 lines (41 loc) · 1.02 KB
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
53
54
55
56
unit Unit2;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, SkiaVoxelComanche;
type
TForm2 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
private
{ Private-Deklarationen }
Game: TVoxelGame;
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
{$R *.fmx}
procedure TForm2.FormCreate(Sender: TObject);
begin
Game := TVoxelGame.Create(Self);
Game.Parent := Self;
Game.Align := TAlignLayout.Client;
end;
procedure TForm2.FormActivate(Sender: TObject);
begin
if Assigned(Game) then
Game.SetFocus;
end;
procedure TForm2.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if Assigned(Game) then
begin
Game.Free;
Game := nil;
end;
CanClose := True;
end;
end.