game_visual_elements.pas
2.34 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
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
{
Free-mtrix - Free cultural selection and social behavior experiments.
Copyright (C) 2016-2017 Carlos Rafael Fernandes Picanço, Universidade Federal do Pará.
The present file is distributed under the terms of the GNU General Public License (GPL v3.0).
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
}
unit game_visual_elements;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Controls, StdCtrls, ExtCtrls;
type
{ TPlayerBox }
TPlayerBox = class (TGroupBox)
LabelLastColor : TLabel;
PanelLastColor : TPanel;
LabelLastRow : TLabel;
LabelLastRowCount : TLabel;
LabelPoints : TLabel;
LabelPointsCount : TLabel;
private
FID: string;
public
constructor Create(AOwner: TComponent;AID:string;Admin:Boolean=False); reintroduce;
property ID : string read FID write FID;
end;
resourcestring
CAP_ROW = 'Linha:';
CAP_COLOR = 'Cor:';
CAP_POINTS = 'Pontos:';
CAP_NA = 'NA';
CAP_WAINTING_FOR_PLAYER = 'Esperando Jogador...';
implementation
{ TPlayerBox }
constructor TPlayerBox.Create(AOwner: TComponent; AID: string; Admin: Boolean);
begin
inherited Create(AOwner);
FID := AID;
AutoSize := True;
Caption := CAP_WAINTING_FOR_PLAYER;
with ChildSizing do
begin
ControlsPerLine := 2;
EnlargeHorizontal := crsHomogenousChildResize;
HorizontalSpacing := 30;
Layout := cclLeftToRightThenTopToBottom;
LeftRightSpacing := 20;
TopBottomSpacing := 20;
VerticalSpacing := 10;
end;
LabelLastColor := TLabel.Create(Self);
LabelLastColor.Caption := CAP_COLOR;
LabelLastColor.Parent := Self;
PanelLastColor := TPanel.Create(Self);
PanelLastColor.Caption:=CAP_NA;
//PanelLastColor.Color:= $0;
PanelLastColor.Parent:= Self;
LabelLastRow:= TLabel.Create(Self);
LabelLastRow.Caption:=CAP_ROW;
LabelLastRow.Parent := Self;
LabelLastRowCount:= TLabel.Create(Self);
LabelLastRowCount.Caption:=CAP_NA;
LabelLastRowCount.Parent := Self;
Enabled:= False;
if Admin then
begin
LabelPoints:= TLabel.Create(Self);
LabelPoints.Caption:=CAP_POINTS;
LabelPoints.Parent := Self;
LabelPointsCount:= TLabel.Create(Self);
LabelPointsCount.Caption:='0';
LabelPointsCount.Parent := Self;
end;
//LabelLastRow.AutoSize := False;
end;
end.