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 }; }
/// <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 }; }
public void SetBannerType(UIResRectangle bannerType) { _menuList.ForEach(m => m.SetBannerType(bannerType)); }