-
Notifications
You must be signed in to change notification settings - Fork 19
/
Frames.Overlay.pas
42 lines (33 loc) · 960 Bytes
/
Frames.Overlay.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
unit Frames.Overlay;
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.Ani, FMX.Layouts, FMX.Controls.Presentation;
type
TfrmOverlay = class(TFrame)
aniIndicator: TAniIndicator;
panelOverlay: TPanel;
animationfloatOverlay: TFloatAnimation;
public
type
TOverlayType = (otNone, otLoading, otOverlay);
private
FOverlay: TOverlayType;
procedure SetOverlay(const Value: TOverlayType);
public
property Overlay: TOverlayType read FOverlay write SetOverlay;
end;
implementation
{$R *.fmx}
procedure TfrmOverlay.SetOverlay(const Value: TOverlayType);
begin
if FOverlay <> Value then
begin
FOverlay := Value;
Visible := FOverlay <> otNone;
panelOverlay.Visible := FOverlay = otOverlay;
aniIndicator.Visible := FOverlay = otLoading;
end;
end;
end.