-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathuWin.pas
More file actions
61 lines (51 loc) · 1.2 KB
/
uWin.pas
File metadata and controls
61 lines (51 loc) · 1.2 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
57
58
59
60
61
unit uWin;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls, FMX.Objects;
type
TWin = class(TFrame)
Rectangle1: TRectangle;
Rectangle2: TRectangle;
S: TImage;
private
public
procedure ShowIn(aControl: TForm);
end;
Var
Win : TWin;
implementation
Uses
FMX.Ani,
uGameInterfaces;
{$R *.fmx}
procedure TWin.ShowIn(aControl: TForm);
begin
Parent := aControl;
Width := aControl.Width;
Height := aControl.Width;
Position.X := (aControl.Width - Width)/2;
Position.Y := (aControl.Height - Height)/2;
Opacity := 0;
BringToFront;
TAnimator.AnimateFloat(Self, 'Opacity', 1, 0.5);
TThread.CreateAnonymousThread(
Procedure
Begin
Sleep(5000);
TTHread.Synchronize(Nil,
Procedure
Begin
TAnimator.AnimateFloat(Self, 'Opacity', 0 , 0.5);
End);
Sleep(510);
TTHread.Synchronize(Nil,
Procedure
Begin
Parent := Nil;
(Owner as IMinesweeper).CentralizeMap;
(Owner as IMinesweeper).ShowStartScreen;
End);
End).Start;
end;
end.