コード例 #1
0
ファイル: TimerBars.cs プロジェクト: njames93/NativeUI
        public override void Draw(int interval)
        {
            SizeF res  = UIMenu.GetScreenResolutionMantainRatio();
            Point safe = UIMenu.GetSafezoneBounds();

            base.Draw(interval);
            new UIResText(Text, new Point((int)res.Width - safe.X - 10, (int)res.Height - safe.Y - (42 + (4 * interval))), 0.5f, Color.White, Font.ChaletLondon, UIResText.Alignment.Right).Draw();
        }
コード例 #2
0
        public override void Draw(int interval, Size offset)
        {
            SizeF res  = UIMenu.GetScreenResolutionMantainRatio();
            Point safe = UIMenu.GetSafezoneBounds() + offset;

            base.Draw(interval, offset);
            new UIResText(Text, new Point((int)res.Width - safe.X - 10, (int)res.Height - safe.Y - (42 + (interval))), 0.45f, Color.White, Font.ChaletComprimeCologne, UIResText.Alignment.Right).Draw();
        }
コード例 #3
0
ファイル: TimerBars.cs プロジェクト: njames93/NativeUI
        public override void Draw(int interval)
        {
            SizeF res  = UIMenu.GetScreenResolutionMantainRatio();
            Point safe = UIMenu.GetSafezoneBounds();

            base.Draw(interval);

            var start = new Point((int)res.Width - safe.X - 160, (int)res.Height - safe.Y - (28 + (4 * interval)));

            new UIResRectangle(start, new Size(150, 15), BackgroundColor).Draw();
            new UIResRectangle(start, new Size((int)(150 * Percentage), 15), ForegroundColor).Draw();
        }
コード例 #4
0
ファイル: TimerBars.cs プロジェクト: njames93/NativeUI
        public virtual void Draw(int interval)
        {
            SizeF res  = UIMenu.GetScreenResolutionMantainRatio();
            Point safe = UIMenu.GetSafezoneBounds();

            new UIResText(Label, new Point((int)res.Width - safe.X - 180, (int)res.Height - safe.Y - (30 + (4 * interval))), 0.3f, Color.White, Font.ChaletLondon, UIResText.Alignment.Right).Draw();
            new Sprite("timerbars", "all_black_bg", new Point((int)res.Width - safe.X - 298, (int)res.Height - safe.Y - (40 + (4 * interval))), new Size(300, 37), 0f, Color.FromArgb(180, 255, 255, 255)).Draw();

            Screen.HideHudComponentThisFrame(HudComponent.AreaName);
            Screen.HideHudComponentThisFrame(HudComponent.StreetName);
            Screen.HideHudComponentThisFrame(HudComponent.VehicleName);
        }
コード例 #5
0
ファイル: TimerBars.cs プロジェクト: jamieb452/NativeUI
        public virtual void Draw(int interval)
        {
            SizeF  res  = UIMenu.GetScreenResolutionMantainRatio();
            PointF safe = UIMenu.GetSafezoneBounds();

            new UIResText(Label, new PointF((int)res.Width - safe.X - 180, (int)res.Height - safe.Y - (30 + (4 * interval))), 0.3f, UnknownColors.White, Font.ChaletLondon, UIResText.Alignment.Right).Draw();
            new Sprite("timerbars", "all_black_bg", new PointF((int)res.Width - safe.X - 298, (int)res.Height - safe.Y - (40 + (4 * interval))), new SizeF(300, 37), 0f, Color.FromArgb(180, 255, 255, 255)).Draw();

            Function.Call(Hash.HIDE_HUD_COMPONENT_THIS_FRAME, (int)HudComponent.AreaName);
            Function.Call(Hash.HIDE_HUD_COMPONENT_THIS_FRAME, (int)HudComponent.StreetName);
            Function.Call(Hash.HIDE_HUD_COMPONENT_THIS_FRAME, (int)HudComponent.VehicleName);
        }
コード例 #6
0
        public virtual void Draw(int interval)
        {
            SizeF  res  = UIMenu.GetScreenResolutionMaintainRatio();
            PointF safe = UIMenu.GetSafezoneBounds();

            new UIResText(Label, new PointF((int)res.Width - safe.X - 180, (int)res.Height - safe.Y - (30 + (4 * interval))), 0.3f, Color.FromArgb(255, 255, 255, 255), Font.ChaletLondon, UIResText.ScreenAlignment.Right).Draw();

            CitizenFX.Core.Native.API.DrawSprite("timerbars", "all_black_bg", ((int)res.Width - safe.X - 298) / res.Width + (300f / res.Width / 2), (res.Height - safe.Y - (40 + (4 * interval))) / res.Height + (37 / res.Height / 2), 300f / res.Width, 37f / res.Height, 0f, 255, 255, 255, 180);

            // TODO: just move them instead
            HideHudComponentThisFrame(7);
            HideHudComponentThisFrame(9);
            HideHudComponentThisFrame(6);
        }