Exemplo n.º 1
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        /// <param name="dialog"></param>
        /// <param name="container"></param>
        /// <param name="item"></param>
        /// <param name="index"></param>
        public MenuDialogItem(MenuDialog dialog, PoolableScrollContainer <IMenuDialogOption> container, IMenuDialogOption item, int index)
            : base(container, item, index)
        {
            Size  = new ScalableVector2(Container.Width, HEIGHT);
            Alpha = 0;

            Button = new MenuDialogItemButton(Container, (o, e) =>
            {
                Item.ClickAction();
                DialogManager.Dismiss(dialog);
            })
            {
                Parent = this,
                Size   = Size,
                Alpha  = 0
            };

            Name = new SpriteTextBitmap(FontsBitmap.GothamRegular, Item.Name)
            {
                Parent    = this,
                Alignment = Alignment.MidLeft,
                X         = 15,
                FontSize  = 14,
                Tint      = Item.Color
            };
        }
Exemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="dialog"></param>
        public MenuDialogBox(MenuDialog dialog)
        {
            Dialog = dialog;

            Image = UserInterface.PlayerOptionsPanel;
            Size  = new ScalableVector2(450, 354);

            CreateContainer();
        }
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        /// <param name="dialog"></param>
        /// <param name="availableItems"></param>
        public MenuDialogScrollContainer(MenuDialog dialog, List <IMenuDialogOption> availableItems) : base(availableItems,
                                                                                                            int.MaxValue, 0, new ScalableVector2(446, 346), new ScalableVector2(446, 346))
        {
            Dialog               = dialog;
            Alpha                = 0;
            Scrollbar.Tint       = ColorHelper.HexToColor("#eeeeee");
            Scrollbar.Width      = 6;
            Scrollbar.X          = 14;
            ScrollSpeed          = 150;
            EasingType           = Easing.OutQuint;
            TimeToCompleteScroll = 1500;

            CreatePool();
        }