public UIMenuHorizontalOneLineGridPanel(string LeftText, string RightText, float CirclePositionX = 0.5f) { Enabled = true; Background = new Sprite("commonmenu", "gradient_bgd", new Point(0, 0), new Size(431, 275)); Grid = new Sprite("NativeUI", "horizontal_grid", new Point(0, 0), new Size(200, 200), 0f, Color.FromArgb(255, 255, 255)); Circle = new Sprite("mpinventory", "in_world_circle", new Point(0, 0), new Size(20, 20), 0f, Color.FromArgb(255, 255, 255)); Audio = new UIMenuGridAudio("CONTINUOUS_SLIDER", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); Left = new UIResText(LeftText ?? "Left", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); Right = new UIResText(RightText ?? "Right", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); SetCirclePosition = new PointF(CirclePositionX, 0.5f); }
public UIMenuPercentagePanel(string title, string MinText, string MaxText) { Enabled = true; Background = new Sprite("commonmenu", "gradient_bgd", new Point(0, 0), new Size(431, 275)); ActiveBar = new UIResRectangle(new Point(0, 0), new Size(413, 10), Color.FromArgb(245, 245, 245)); BackgroundBar = new UIResRectangle(new Point(0, 0), new Size(413, 10), Color.FromArgb(80, 80, 80)); Min = new UIResText(MinText != "" || MinText != null ? MinText : "0%", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); Max = new UIResText(MaxText != "" || MaxText != null ? MaxText : "100%", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); Title = new UIResText(title != "" || title != null ? title : "Opacity", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); Audio = new UIMenuGridAudio("CONTINUOUS_SLIDER", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); }
public UIMenuVerticalOneLineGridPanel(string TopText, string BottomText, float circlePositionY = .5f) { Enabled = true; Background = new Sprite("commonmenu", "gradient_bgd", new Point(0, 0), new Size(431, 275)); Grid = new Sprite("NativeUI", "vertical_grid", new Point(0, 0), new Size(200, 200), 0f, Color.FromArgb(255, 255, 255)); Circle = new Sprite("mpinventory", "in_world_circle", new Point(0, 0), new Size(20, 20), 0f, Color.FromArgb(255, 255, 255)); Audio = new UIMenuGridAudio("CONTINUOUS_SLIDER", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); Top = new UIResText(TopText ?? "Up", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); Bottom = new UIResText(BottomText ?? "Down", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); SetCirclePosition = new PointF(.5f, circlePositionY != 0 ? circlePositionY : .5f); }
public UIMenuGridPanel(string TopText, string LeftText, string RightText, string BottomText, PointF circlePosition) { Enabled = true; Background = new Sprite("commonmenu", "gradient_bgd", new Point(0, 0), new Size(431, 275)); Grid = new Sprite("pause_menu_pages_char_mom_dad", "nose_grid", new Point(0, 0), new Size(200, 200), 0f, Color.FromArgb(255, 255, 255)); Circle = new Sprite("mpinventory", "in_world_circle", new PointF(0, 0), new SizeF(20, 20), 0f, Color.FromArgb(255, 255, 255)); Audio = new UIMenuGridAudio("CONTINUOUS_SLIDER", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); Top = new UIResText(TopText ?? "Up", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); Left = new UIResText(LeftText ?? "Left", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); Right = new UIResText(RightText ?? "Right", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); Bottom = new UIResText(BottomText ?? "Down", new Point(0, 0), .35f, Color.FromArgb(255, 255, 255), CitizenFX.Core.UI.Font.ChaletLondon, Alignment.Center); SetCirclePosition = new PointF(circlePosition.X != 0 ? circlePosition.X : .5f, circlePosition.Y != 0 ? circlePosition.Y : .5f); }
public UIMenuProgressItem(string text, string description, int maxItems, int index, bool counter) : base(text, description) { Items = maxItems; _index = index; Counter = counter; _max = 407.5f; Audio = new UIMenuGridAudio("CONTINUOUS_SLIDER", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); _background = new UIResRectangle(new PointF(0, 0), new SizeF(415, 14), Color.FromArgb(255, 0, 0, 0)); _bar = new UIResRectangle(new PointF(0, 0), new SizeF(407.5f, 7.5f)); if (Counter) { SetRightLabel(_index + "/" + Items); } else { SetRightLabel("" + _index); } UpdateBar(); }
public UIMenuProgressItem(string text, string description, List <dynamic> items, int index, bool counter) : base(text, description) { Items = items; Index = index; Counter = counter; Max = 407.5f; Audio = new UIMenuGridAudio("CONTINUOUS_SLIDER", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); _background = new UIResRectangle(new PointF(0, 0), new Size(415, 20), Color.FromArgb(0, 0, 0, 255)); Bar = new UIResRectangle(new PointF(0, 0), new SizeF(407.5f, 12.5f)); _rectangle.Size = new SizeF(_rectangle.Size.Width, 60); _selectedSprite.Size = new SizeF(_selectedSprite.Size.Width, 60); if (Counter) { SetRightLabel(Index + "/" + Items.Count); } else { SetRightLabel("" + Items[Index]); } Bar.Size = new SizeF(Index / Items.Count * Max, Bar.Size.Height); }
public UIMenuSliderProgressItem(string text, int maxCount, int startIndex, string description, Color sliderColor, Color backgroundSliderColor, bool divider = false) : base(text, description) { _max = maxCount; _value = startIndex; _arrowLeft = new Sprite("commonmenu", "arrowleft", new PointF(0, 105), new SizeF(25, 25)); _arrowRight = new Sprite("commonmenu", "arrowright", new PointF(0, 105), new SizeF(25, 25)); SliderColor = sliderColor; BackgroundSliderColor = backgroundSliderColor; _rectangleBackground = new UIResRectangle(new PointF(0, 0), new SizeF(150, 10), BackgroundSliderColor); _rectangleSlider = new UIResRectangle(new PointF(0, 0), new SizeF(75, 10), SliderColor); if (divider) { _rectangleDivider = new UIResRectangle(new Point(0, 0), new Size(2, 20), Colors.WhiteSmoke); } else { _rectangleDivider = new UIResRectangle(new Point(0, 0), new Size(2, 20), Color.Transparent); } float offset = _rectangleBackground.Size.Width / _max * _value; _rectangleSlider.Size = new SizeF(offset, _rectangleSlider.Size.Height); Audio = new UIMenuGridAudio("CONTINUOUS_SLIDER", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); }