protected override void OnSizeChanged() { av.Move(Width / 2 - 40, 10); btnRemove.Resize(Width - 20, btnRemove.Height); btnChat.Resize(Width - 20, btnChat.Height); btnDescribe.Resize(Width - 20, btnDescribe.Height); btnExile.Resize(Width - 20, btnExile.Height); btnInvite.Resize(Width - 20, btnInvite.Height); }
public CombatView(Widget parent) : base(parent) { relations = new LinkedList <CombatRelation>(); avatar = new AvatarView(this); avatar.Click += OnCurrentAvatarClick; avatar.Move(-avatar.Width, 0); btnGive = new GiveButton(this); btnGive.Move(-avatar.Width - btnGive.Width - 5, 0); btnGive.Click += OnCurrentGiveButtonClick; }
public CombatRelation(Widget parent, int id) : base(parent) { this.id = id; Size = background.Size; avatar = new AvatarView(this); avatar.Resize(27, 27); avatar.Move(25, (Height - avatar.Height) / 2); avatar.Click += OnAvatarClick; button = new GiveButton(this); button.Resize(15, 15); button.Move(5, 4); button.Click += OnButtonClick; label = new Label(this, Fonts.Default); label.Move(65, 10); }
public ListItem(Widget parent, string charName, IEnumerable <Delayed <ISprite> > layers) : base(parent) { Size = background.Size; nameTextLine = new TextLine(Fonts.Heading); nameTextLine.TextColor = Color.White; nameTextLine.Append(charName); btnPlay = new Button(this, 100); btnPlay.Text = "Play"; btnPlay.Move(Width - 105, Height - 24); btnPlay.Click += () => Selected.Raise(); avatar = new AvatarView(this); avatar.Avatar = new Avatar(layers); var padding = (Height - avatar.Height) / 2; avatar.Move(padding, padding); }