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

            Button = new ImageButton(UserInterface.BlankBox, (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
            };
        }
Esempio n. 2
0
        /// <summary>
        /// </summary>
        /// <param name="dialog"></param>
        /// <param name="user"></param>
        public MultiplayerPlayerOptions(MultiplayerPlayerOptionsDialog dialog, OnlineUser user)
        {
            Dialog = dialog;
            User   = user;

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

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

            CreatePool();
        }