Commit 34a0576d8c35328bf8df640b846201d32e64952e
1 parent
0dc88914
Exists in
master
add player box visual element
Showing
1 changed file
with
73 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +unit game_visual_elements; | |
| 2 | + | |
| 3 | +{$mode objfpc}{$H+} | |
| 4 | + | |
| 5 | +interface | |
| 6 | + | |
| 7 | +uses | |
| 8 | + Classes, SysUtils, Controls, StdCtrls, ExtCtrls; | |
| 9 | + | |
| 10 | +type | |
| 11 | + | |
| 12 | + { TPlayerBox } | |
| 13 | + | |
| 14 | + TPlayerBox = class (TGroupBox) | |
| 15 | + LabelLastColor : TLabel; | |
| 16 | + PanelLastColor : TPanel; | |
| 17 | + LabelLastRow : TLabel; | |
| 18 | + LabelLastRowCount : TLabel; | |
| 19 | + private | |
| 20 | + FID: string; | |
| 21 | + public | |
| 22 | + constructor Create(AOwner: TComponent;AID:string); reintroduce; | |
| 23 | + property ID : string read FID write FID; | |
| 24 | + end; | |
| 25 | + | |
| 26 | +resourcestring | |
| 27 | + CAP_ROW = 'Linhas:'; | |
| 28 | + CAP_COLOR = 'Cor:'; | |
| 29 | + CAP_NA = 'NA'; | |
| 30 | + CAP_WAINTING_FOR_PLAYER = 'Esperando Jogador...'; | |
| 31 | + | |
| 32 | +implementation | |
| 33 | + | |
| 34 | +{ TPlayerBox } | |
| 35 | + | |
| 36 | +constructor TPlayerBox.Create(AOwner: TComponent; AID: string); | |
| 37 | +begin | |
| 38 | + inherited Create(AOwner); | |
| 39 | + FID := AID; | |
| 40 | + AutoSize := True; | |
| 41 | + Caption := CAP_WAINTING_FOR_PLAYER; | |
| 42 | + with ChildSizing do | |
| 43 | + begin | |
| 44 | + ControlsPerLine := 2; | |
| 45 | + EnlargeHorizontal := crsHomogenousChildResize; | |
| 46 | + HorizontalSpacing := 30; | |
| 47 | + Layout := cclLeftToRightThenTopToBottom; | |
| 48 | + LeftRightSpacing := 20; | |
| 49 | + TopBottomSpacing := 20; | |
| 50 | + VerticalSpacing := 10; | |
| 51 | + end; | |
| 52 | + LabelLastColor := TLabel.Create(Self); | |
| 53 | + LabelLastColor.Caption := CAP_COLOR; | |
| 54 | + LabelLastColor.Parent := Self; | |
| 55 | + | |
| 56 | + PanelLastColor := TPanel.Create(Self); | |
| 57 | + PanelLastColor.Caption:=''; | |
| 58 | + //PanelLastColor.Color:= $0; | |
| 59 | + PanelLastColor.Parent:= Self; | |
| 60 | + | |
| 61 | + LabelLastRow:= TLabel.Create(Self); | |
| 62 | + LabelLastRow.Caption:=CAP_ROW; | |
| 63 | + LabelLastRow.Parent := Self; | |
| 64 | + | |
| 65 | + LabelLastRow:= TLabel.Create(Self); | |
| 66 | + LabelLastRow.Caption:=CAP_NA; | |
| 67 | + LabelLastRow.Parent := Self; | |
| 68 | + Enabled:= False; | |
| 69 | + //LabelLastRow.AutoSize := False; | |
| 70 | +end; | |
| 71 | + | |
| 72 | +end. | |
| 73 | + | ... | ... |