Exemplo n.º 1
0
        public virtual void AddBackgroundImage(ILayout labelStack)
        {
            //get the background image dimensions
            var width  = Math.Min(Resolution.TitleSafeArea.Width, labelStack.Rect.Width + 128);
            var height = Math.Min(Resolution.TitleSafeArea.Height, labelStack.Rect.Height + 200);

            //Add the background image
            var bkgImage = new BackgroundImage(Content.Load <Texture2D>(StyleSheet.MessageBoxBackgroundImageResource))
            {
                FillRect   = true,
                Position   = new Point(labelStack.Rect.Center.X, labelStack.Rect.Center.Y),
                Size       = new Vector2(width, height),
                Horizontal = HorizontalAlignment.Center,
                Vertical   = VerticalAlignment.Center
            };

            AddItem(bkgImage);
        }
Exemplo n.º 2
0
 public BackgroundImage(BackgroundImage inst) : base(inst)
 {
 }