Exemplo n.º 1
0
 private void UpdateAmountLabel()
 {
     lblAmount.Clear();
     if (item != null && item.Amount >= 0)
     {
         lblAmount.Append(item.Amount.ToString());
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public Tooltip(string text)
 {
     if (!string.IsNullOrEmpty(text))
     {
         textLine           = new TextLine(Fonts.Tooltip);
         textLine.TextColor = Color.White;
         textLine.Append(text);
     }
 }
Exemplo n.º 4
0
        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;
        }
Exemplo n.º 5
0
        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;
        }
Exemplo n.º 6
0
            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);
            }
Exemplo n.º 7
0
 private void UpdateLabel()
 {
     label.Clear();
     label.Append(text ?? "");
     this.Resize(label.TextWidth + TabPadding * 2, tabHeight);
 }