private void InitLayout() { this.padding1 = new Padding(0.0, 1.0 / 6.0); this.Children.Add(this.padding1); this.padding5 = new Padding(0.0, 1.0 - (1.0 - 0.01) * (1.0 - 0.02)); this.padding1.Children.Add(this.padding5); this.box1 = new Box(Direction.Vertical); this.padding5.Children.Add(this.box1); this.adapter1 = new Adapter(Direction.Horizontal); this.box1.Children.Add(this.adapter1); this.box2 = new Box(Direction.Horizontal); this.adapter1.Children.Add(this.box2); this.padding2 = new Padding(0.06, 0.04); this.box2.Children.Add(this.padding2); this.graveyardPlaceholder = new CardPlaceholderWidget(); this.padding2.Children.Add(this.graveyardPlaceholder); this.padding3 = new Padding(0.06, 0.04); this.box2.Children.Add(this.padding3); this.overlay1 = new Overlay(); this.padding3.Children.Add(this.overlay1); this.deckPlaceholder = new CardPlaceholderWidget(); this.overlay1.Children.Add(this.deckPlaceholder); this.padding4 = new Padding(0.02, 0.04); this.box1.Children.Add(this.padding4); this.solidColor1 = new SolidColor(); this.solidColor1.Color = new Cairo.Color(0.25, 0.25, 0.25, 0.3); this.padding4.Children.Add(this.solidColor1); this.selectionPlaceholder = new GeneralPlaceholderWidget(); this.solidColor1.Children.Add(this.selectionPlaceholder); }
private void InitLayout() { this.padding1 = new Padding(0.01, 0.01); this.Children.Add(this.padding1); this.color1 = new SolidColor(0.02, 0.02); this.color1.Color = new Cairo.Color(0.25, 0.25, 0.25, 0.3); this.padding1.Children.Add(this.color1); this.padding10 = new Padding(0.02, 0.02); this.color1.Children.Add(this.padding10); this.box1 = new Box(Direction.Horizontal); this.padding10.Children.Add(this.box1); this.box2 = new Box(Direction.Vertical); this.box1.Children.Add(this.box2); this.adapter1 = new Adapter(Direction.Vertical); this.adapter1.Alignment = Alignment.Left; this.box2.Children.Add(this.adapter1); this.box3 = new Box(Direction.Horizontal); this.box3.Alignment = Alignment.Left; this.adapter1.Children.Add(this.box3); this.padding4 = new Padding(0.02, 0.02); this.box3.Children.Add(this.padding4); this.playerPic = new Picture(); this.padding4.Children.Add(this.playerPic); this.box5 = new Box(Direction.Vertical); this.box3.Children.Add(this.box5); this.playerLabel = new Label(); this.playerLabel.Font = Pango.FontDescription.FromString("Librarian 16"); this.box5.Children.Add(this.playerLabel); this.adapter2 = new Adapter(Direction.Vertical); this.adapter2.Alignment = Alignment.Left; this.box5.Children.Add(this.adapter2); this.box6 = new Box(Direction.Horizontal); this.adapter2.Children.Add(this.box6); this.padding8 = new Padding(0.04, 0.04); this.box6.Children.Add(this.padding8); this.onlinePic = new Picture(); this.padding8.Children.Add(this.onlinePic); this.padding9 = new Padding(0.04, 0.04); this.box6.Children.Add(this.padding9); this.padding2 = new Padding(0.0, 0.02, 0.04, 0.04); this.box2.Children.Add(this.padding2); this.color2 = new SolidColor(); this.color2.Color = new Cairo.Color(0.25, 0.25, 0.25, 0.3); this.padding2.Children.Add(this.color2); this.playerHandPlaceholder = new GeneralPlaceholderWidget(); this.color2.Children.Add(this.playerHandPlaceholder); this.padding3 = new Padding(0.0, 0.02, 0.04, 0.04); this.box2.Children.Add(this.padding3); this.color3 = new SolidColor(); this.color3.Color = new Cairo.Color(0.25, 0.25, 0.25, 0.3); this.padding3.Children.Add(this.color3); this.playerTablePlaceholder = new GeneralPlaceholderWidget(); this.color3.Children.Add(this.playerTablePlaceholder); this.box4 = new Box(Direction.Vertical); this.box1.Children.Add(this.box4); this.padding5 = new Padding(0.06, 0.0, 0.04, 0.04); this.box4.Children.Add(this.padding5); this.playerRolePlaceholder = new CardPlaceholderWidget(); this.padding5.Children.Add(this.playerRolePlaceholder); this.padding6 = new Padding(0.06, 0.0, 0.04, 0.04); this.box4.Children.Add(this.padding6); this.characterOverlay = new Overlay(); this.padding6.Children.Add(this.characterOverlay); this.characterPlaceholder = new CardPlaceholderWidget(); this.characterOverlay.Children.Add(this.characterPlaceholder); this.padding7 = new Padding(0.06, 0.0, 0.04, 0.04); this.box4.Children.Add(this.padding7); this.cardPlaceholder1 = new CardPlaceholderWidget(); this.padding7.Children.Add(this.cardPlaceholder1); }
public override void Reallocate() { PlayingCardListWidget l = new PlayingCardListWidget(); CardPlaceholderWidget[] cw = new CardPlaceholderWidget[animators.Count]; for(int i = 0; i < animators.Count; i++) l.Children.Add(cw[i] = new CardPlaceholderWidget()); l.Reallocate(Placeholder.GetAbsoluteAllocation()); for(int i = 0; i < animators.Count; i++) animators[i].GetState(Parent.type).Allocation = cw[i].GetAbsoluteAllocation(); }