Exemple #1
0
        public void PaintTopInGame(ClipState clipState)
        {
            if (clipState != ClipState.BeforeClip)
            {
                return;
            }
            if (!show)
            {
                return;
            }
            if (currentRun == null)
            {
                currentRun = IsNephalemRift ? SpecialArea.Rift : SpecialArea.GreaterRift;
            }

            if (Hud.Game.RiftPercentage >= CompletionDisplayLimit && Hud.Game.RiftPercentage < 100)//0으로하면팝업창안뜸
            {
                var text   = Hud.Game.RiftPercentage.ToString("F1", CultureInfo.InvariantCulture) + "%";
                var title  = RiftCompletionTitleFunc.Invoke();
                var layout = CompletionLabelDecorator.TextFont.GetTextLayout(title);
                var w      = layout.Metrics.Width * 0.8f;                                                                                         //팝업창가로크기
                var h      = Hud.Window.Size.Height * 0.04f;                                                                                      //팝업창세로크기
                CompletionLabelDecorator.Paint(Hud.Window.Size.Width * 0.91f - w / 2, Hud.Window.Size.Height * 0.31f - h / 2, w, h, text, title); //가로0.5f 세로위치0.18f
            }

            if (IsNephalemRift && uiProgressBar.Visible)
            {
                var layout = ProgressBarTimerFont.GetTextLayout(GetText(true));
                var x      = uiProgressBar.Rectangle.Left - layout.Metrics.Width / 2 + uiProgressBar.Rectangle.Width * (float)Hud.Game.RiftPercentage / 100.0f;
                var y      = uiProgressBar.Rectangle.Bottom + uiProgressBar.Rectangle.Height * 0.1f;

                ProgressBarTimerFont.DrawText(layout, x, y);
            }
            else
            {
                var layout = ObjectiveProgressFont.GetTextLayout(GetText(false));
                var x      = Hud.Render.MinimapUiElement.Rectangle.Right - layout.Metrics.Width - Hud.Window.Size.Height * 0.033f;
                var y      = Hud.Render.MinimapUiElement.Rectangle.Bottom + Hud.Window.Size.Height * 0.0033f;
                //brus.DrawRectangle(x, y, 100, 100);
                ObjectiveProgressFont.DrawText(layout, x, y);

                var texture = Hud.Texture.GetTexture(currentRun == SpecialArea.Rift ? 1528804216 : 3075014090);
                texture.Draw(x - texture.Width * 0.75f, Hud.Render.MinimapUiElement.Rectangle.Bottom - texture.Height / 4, texture.Width, texture.Height);
            }
        }
Exemple #2
0
        public override void Load(IController hud)
        {
            base.Load(hud);

            brus                          = Hud.Render.CreateBrush(255, 0, 0, 0, 0);
            ShowClosingTimer              = true;
            GreaterRiftCountdown          = true;
            ShowGreaterRiftTimer          = true;
            ShowGreaterRiftCompletedTimer = true;
            CompletionDisplayLimit        = 90;

            ObjectiveProgressSymbol = "\u2694";       //⚔
            GuardianAliveSymbol     = "\uD83D\uDC7F"; //👿
            GuardianDeadSymbol      = "\uD83D\uDC80"; //💀

            ObjectiveProgressSymbol = "";
            GuardianAliveSymbol     = "\uD83D\uDC7F"; //??
            GuardianDeadSymbol      = "\uD83D\uDC80"; //??uDC80"; //??

            MinutesSecondsFormat = "{0:%m}:{0:ss}";
            SecondsFormat        = "{0:%s}";

            ProgressPercentFormat = "({0:F1}%)";
            ClosingSecondsFormat  = "({0:%s})";

            ProgressBarTimerFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 210, 150, true, false, 160, 0, 0, 0, true);

            ObjectiveProgressFont = Hud.Render.CreateFont("tahoma", 8, 224, 240, 240, 240, false, false, false);
            ObjectiveProgressFont.SetShadowBrush(222, 0, 0, 0, true);

            RiftCompletionTitleFunc  = () => riftQuest.QuestStep.SplashLocalized.Trim();
            CompletionLabelDecorator = new TopLabelWithTitleDecorator(Hud)
            {
                BorderBrush     = Hud.Render.CreateBrush(255, 180, 147, 109, -1),
                BackgroundBrush = Hud.Render.CreateBrush(128, 0, 0, 0, 0),
                TextFont        = Hud.Render.CreateFont("tahoma", 9, 255, 255, 210, 150, true, false, false),
                TitleFont       = Hud.Render.CreateFont("tahoma", 6, 255, 180, 147, 109, true, false, false),
            };

            pauseTimer    = Hud.Time.CreateWatch();
            riftTimer     = Hud.Time.CreateWatch();
            guardianTimer = Hud.Time.CreateWatch();
        }
Exemple #3
0
        public void PaintTopInGame(ClipState clipState)
        {
            inRift = Hud.Game.SpecialArea == SpecialArea.Rift || Hud.Game.SpecialArea == SpecialArea.GreaterRift;
            if (clipState != ClipState.BeforeClip)
            {
                return;
            }
            if (!show)
            {
                return;
            }
            if (currentRun == null)
            {
                currentRun = IsNephalemRift ? SpecialArea.Rift : SpecialArea.GreaterRift;
            }

            if (Hud.Game.RiftPercentage >= CompletionDisplayLimit && Hud.Game.RiftPercentage < 100 && ShowNotifyAtRiftPercentage)
            {
                var text   = Hud.Game.RiftPercentage.ToString("F1", CultureInfo.InvariantCulture) + "%";
                var title  = RiftCompletionTitleFunc.Invoke();
                var layout = CompletionLabelDecorator.TextFont.GetTextLayout(title);
                var w      = layout.Metrics.Width * 0.8f;
                var h      = Hud.Window.Size.Height * 0.04f;
                CompletionLabelDecorator.Paint(Hud.Window.Size.Width * 0.5f - w / 2, Hud.Window.Size.Height * 0.18f - h / 2, w, h, text, title);
            }

            if (IsNephalemRift && uiProgressBar.Visible)
            {
                var layout = ProgressBarTimerFont.GetTextLayout(GetText(true));
                var x      = uiProgressBar.Rectangle.Left - layout.Metrics.Width / 2 + uiProgressBar.Rectangle.Width * (float)Hud.Game.RiftPercentage / 100.0f;
                var y      = uiProgressBar.Rectangle.Bottom + uiProgressBar.Rectangle.Height * 0.1f;

                ProgressBarTimerFont.DrawText(layout, x, y);
            }
            else
            {
                var layout = ObjectiveProgressFont.GetTextLayout(GetText(false));
                var x      = Hud.Render.MinimapUiElement.Rectangle.Right - layout.Metrics.Width - Hud.Window.Size.Height * 0.033f;
                var y      = Hud.Render.MinimapUiElement.Rectangle.Bottom + Hud.Window.Size.Height * 0.0033f;

                ObjectiveProgressFont.DrawText(layout, x, y);
            }
        }