Exemplo n.º 1
0
        /// <summary>
        /// List item, with left/right arrows.
        /// </summary>
        /// <param name="text">Item label.</param>
        /// <param name="items">List that contains your items.</param>
        /// <param name="index">Index in the list. If unsure user 0.</param>
        /// <param name="description">Description for this item.</param>
        public UIMenuListItem(string text, List <UIMenuListItemItem> items, int index, string description)
            : base(text, description)
        {
            const int y = 0;

            _items      = new List <UIMenuListItemItem>(items);
            _arrowLeft  = new Sprite("commonmenu", "arrowleft", new PointF(110, 105 + y), new SizeF(30, 30));
            _arrowRight = new Sprite("commonmenu", "arrowright", new PointF(280, 105 + y), new SizeF(30, 30));
            _itemText   = new UIResText("", new PointF(290, y + 104), 0.35f, UnknownColors.White, Font.ChaletLondon,
                                        UIResText.Alignment.Left)
            {
                TextAlignment = UIResText.Alignment.Right
            };
        }
Exemplo n.º 2
0
        protected void Init()
        {
            _selectedSprite = new Sprite("commonmenu", "gradient_nav", new PointF(0, 0), new SizeF(431, 38), 0, HighlightColor);
            _rectangle      = new UIResRectangle(new PointF(0, 0), new SizeF(431, 38), Color.FromArgb(150, 0, 0, 0));
            _text           = new UIResText(Text, new PointF(8, 0), 0.33f, UnknownColors.WhiteSmoke, CitizenFX.Core.UI.Font.ChaletLondon, UIResText.Alignment.Left);
            Description     = Description;

            _badgeLeft  = new Sprite("commonmenu", "", new PointF(0, 0), new SizeF(40, 40));
            _badgeRight = new Sprite("commonmenu", "", new PointF(0, 0), new SizeF(40, 40));

            _labelText = new UIResText("", new PointF(0, 0), 0.35f)
            {
                TextAlignment = UIResText.Alignment.Right
            };
        }
Exemplo n.º 3
0
        /// <summary>
        /// Basic menu button.
        /// </summary>
        /// <param name="text">Button label.</param>
        /// <param name="description">Description.</param>
        public UIMenuItem(string text, string description)
        {
            Enabled = true;

            _rectangle      = new UIResRectangle(new PointF(0, 0), new SizeF(431, 38), Color.FromArgb(150, 0, 0, 0));
            _text           = new UIResText(text, new PointF(8, 0), 0.33f, UnknownColors.WhiteSmoke, CitizenFX.Core.UI.Font.ChaletLondon, UIResText.Alignment.Left);
            Description     = description;
            _selectedSprite = new Sprite("commonmenu", "gradient_nav", new PointF(0, 0), new SizeF(431, 38));

            _badgeLeft  = new Sprite("commonmenu", "", new PointF(0, 0), new SizeF(40, 40));
            _badgeRight = new Sprite("commonmenu", "", new PointF(0, 0), new SizeF(40, 40));

            _labelText = new UIResText("", new PointF(0, 0), 0.35f)
            {
                TextAlignment = UIResText.Alignment.Right
            };
        }