private void UpdateAmountLabel() { lblAmount.Clear(); if (item != null && item.Amount >= 0) { lblAmount.Append(item.Amount.ToString()); } }
public ListBoxItem(Drawable image, string labelText, Color textColor) { this.Image = image; this.labelText = labelText; label = new TextLine(Fonts.LabelText); label.TextColor = textColor; label.Append(labelText); }
public Tooltip(string text) { if (!string.IsNullOrEmpty(text)) { textLine = new TextLine(Fonts.Tooltip); textLine.TextColor = Color.White; textLine.Append(text); } }
public void AddMessage(string text, Color?color) { var line = new TextLine(Fonts.Text); line.TextColor = Color.White; line.Append(text); lines.Add(line); scrollbar.Max = lines.Count - DisplayLineCount; }
public Window(Widget parent, string title) : base(parent) { btnClose = new ImageButton(this); btnClose.Resize(closeButton.Size); btnClose.Image = closeButton; btnClose.PressedImage = closeButtonPressed; btnClose.HoveredImage = closeButtonHovered; btnClose.Click += () => Closed.Raise(); if (!string.IsNullOrEmpty(title)) { titleLine = new TextLine(Fonts.Text); titleLine.TextColor = Color.Yellow; titleLine.Append(title); } Margin = 20; }
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); }
private void UpdateLabel() { label.Clear(); label.Append(text ?? ""); this.Resize(label.TextWidth + TabPadding * 2, tabHeight); }