-
Notifications
You must be signed in to change notification settings - Fork 5
/
unit4.pas
148 lines (128 loc) · 3.7 KB
/
unit4.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
(******************************************************************************)
(* *)
(* Author : Uwe Schächterle (Corpsman) *)
(* *)
(* This file is part of Clickomania *)
(* *)
(* See the file license.md, located under: *)
(* https://github.com/PascalCorpsman/Software_Licenses/blob/main/license.md *)
(* for details about the license. *)
(* *)
(* It is not allowed to change or remove this text from any *)
(* source file of the project. *)
(* *)
(******************************************************************************)
Unit Unit4;
{$MODE objfpc}
Interface
Uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons;
Type
{ TForm4 }
TForm4 = Class(TForm)
Button1: TButton;
Button2: TButton;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Label1: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label2: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label3: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Label36: TLabel;
Label37: TLabel;
Label38: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
SpeedButton1: TSpeedButton;
Procedure Button1Click(Sender: TObject);
Procedure Button2Click(Sender: TObject);
Procedure FormCreate(Sender: TObject);
Procedure GroupBox2Resize(Sender: TObject);
Procedure SpeedButton1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
Procedure OrientLabels(Sender: TObject);
End;
Var
Form4: TForm4;
Implementation
{$R *.lfm}
{$I clickomania.inc}
Uses unit1, uclickomania;
{ TForm4 }
Procedure TForm4.FormCreate(Sender: TObject);
Var
l: Tlabel;
i: Integer;
Begin
caption := 'Statistics';
For i := 5 To 14 Do Begin
l := Tlabel(FindComponent('Label' + inttostr(i)));
l.caption := inttostr(i - 4) + '.';
l := Tlabel(FindComponent('Label' + inttostr(i + 10)));
l.left := 45;
l.font.color := clblue;
End;
Constraints.MinHeight := height;
Constraints.MaxHeight := height;
End;
Procedure TForm4.GroupBox2Resize(Sender: TObject);
Begin
OrientLabels(Nil);
End;
Procedure TForm4.SpeedButton1Click(Sender: TObject);
Begin
Form1.SpeedButton5Click(Nil);
End;
Procedure TForm4.OrientLabels(Sender: TObject);
Var
i: Integer;
l: Tlabel;
Begin
For i := 25 To 34 Do Begin
l := Tlabel(FindComponent('Label' + inttostr(i)));
l.left := GroupBox2.Width - 20 - l.width;
End;
End;
Procedure TForm4.Button2Click(Sender: TObject);
Begin
close;
End;
Procedure TForm4.Button1Click(Sender: TObject);
Begin
Highscore.Clear(high(field) + 1, high(field[0]) + 1, UsedColorNumbers, UsedSpezials);
form1.SpeedButton3Click(Nil);
End;
End.