Exemplo n.º 1
0
        public UIMobileDialog() : base()
        {
            Width     = GameFacade.Screens.CurrentUIScreen.ScreenWidth;
            ScrHeight = GameFacade.Screens.CurrentUIScreen.ScreenHeight;

            BackStripe = new UIDiagonalStripe(new Point(), UIDiagonalStripeSide.LEFT, new Color(0, 70, 140) * 0.33f);
            Add(BackStripe);
            FrontStripe = new UIDiagonalStripe(new Point(), UIDiagonalStripeSide.RIGHT, UIStyle.Current.DialogBg);
            Add(FrontStripe);

            TitleBg = new UIImage(Content.Get().CustomUI.Get("dialog_title_grad.png").Get(GameFacade.GraphicsDevice));
            TitleBg.SetSize(Width, 70);
            Add(TitleBg);

            TitleLabel                    = new UILabel();
            TitleLabel.X                  = 50;
            TitleLabel.CaptionStyle       = TitleLabel.CaptionStyle.Clone();
            TitleLabel.CaptionStyle.Size  = 37;
            TitleLabel.CaptionStyle.Color = UIStyle.Current.DialogTitle;
            TitleLabel.Alignment          = TextAlignment.Top | TextAlignment.Left;
            Add(TitleLabel);

            InterpolatedAnimation = 0f;
            GameFacade.Screens.Tween.To(this, 0.5f, new Dictionary <string, float>()
            {
                { "InterpolatedAnimation", 1f }
            }, TweenQuad.EaseOut);
        }
Exemplo n.º 2
0
        public UICategorySwitcher()
        {
            Stripe = new UIDiagonalStripe(new Point(), UIDiagonalStripeSide.UP, UIStyle.Current.Bg);
            Add(Stripe);

            Grad          = new UIVertGrad();
            Grad.Position = new Vector2(43, 0);
            Grad.Visible  = false;
            Add(Grad);

            MainButton                = new UICatButton(TextureGenerator.GetPxWhite(GameFacade.GraphicsDevice));
            MainButton.Position       = new Microsoft.Xna.Framework.Vector2(10, 31);
            MainButton.OnButtonClick += (b) => { Open(); };
            MainButton.Selected       = true;
            Add(MainButton);

            CategoryExpand = CategoryExpand;
        }