-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuInit.pas
75 lines (62 loc) · 1.36 KB
/
uInit.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
unit uInit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, ComCtrls, jpeg, PNGImage, XPMan, AsyncTimer;
type
TfInit = class(TForm)
pInit: TPanel;
LoadScreen: TImage;
XPManifest1: TXPManifest;
Timer: TTimer;
procedure FormCreate(Sender: TObject);
procedure TimerTimer(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fInit: TfInit;
s: Integer;
cl: Boolean;
i: Integer;
implementation
uses uMain;
{$R *.dfm}
procedure TfInit.FormCreate(Sender: TObject);
begin
s:= 0;
i:= 1;
fInit.Refresh;
end;
procedure TfInit.TimerTimer(Sender: TObject);
begin
s:= s + 1;
fInit.Refresh;
case s of
1: begin fMain.CreateAll; end;
2: fMain.InitAll;
3: fMain.DrawRooms;
4: fMain.LoadTexts(False);
5: fMain.LoadOptions;
6:
begin
Timer.Enabled:= False;
cl:= True;
fMain.Step.Enabled:= True;
Close;
end;
end;
end;
procedure TfInit.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if not cl then Exit;
end;
procedure TfInit.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if not cl then CanClose:= False;
end;
end.