Beispiel #1
0
        public override void Render()
        {
            base.Render();
            Vector2 vector  = new Vector2(Math.Abs(outwards.Y), Math.Abs(outwards.X));
            int     count   = tentacleTextures.Count;
            Vector2 one     = Vector2.One;
            Vector2 justify = new Vector2(0f, 0.5f);

            if (direction == Directions.Left)
            {
                one.X = -1f;
            }
            else if (direction == Directions.Up)
            {
                one.Y = -1f;
            }
            if (direction == Directions.Up || direction == Directions.Down)
            {
                justify = new Vector2(0.5f, 0f);
            }
            for (int i = 0; i < spikes.Length; i++)
            {
                if (!spikes[i].Triggered)
                {
                    MTexture mTexture = tentacleTextures[(int)(spikes[i].TentacleFrame % (float)count)];
                    Vector2  vector2  = base.Position + vector * (float)(2 + i * 4);
                    mTexture.DrawJustified(vector2 + vector, justify, Color.Black, one, 0f);
                    mTexture.DrawJustified(vector2, justify, tentacleColors[spikes[i].TentacleColor], one, 0f);
                }
            }
            RenderSpikes();
        }
        public override void Render()
        {
            base.Render();

            Vector2 justify = Vector2.One * 0.5f;

            switch (direction)
            {
            case Directions.Up:
                justify = new Vector2(0.5f, 1f);
                break;

            case Directions.Down:
                justify = new Vector2(0.5f, 0f);
                break;

            case Directions.Left:
                justify = new Vector2(1f, 0.5f);
                break;

            case Directions.Right:
                justify = new Vector2(0f, 0.5f);
                break;
            }

            for (int i = 0; i < spikePositions.Length; i++)
            {
                MTexture tex = spikeTextures[0];
                Vector2  pos = Position + shakeOffset + spikePositions[i] + outwards * (-4f + Lerp * 4f);
                tex.DrawJustified(pos, justify);
            }
        }
        public override void Render()
        {
            float textWidth = ActiveFont.Measure(Text).X + 81f;

            Icon.DrawJustified(renderPosition - new Vector2(textWidth / 2f + 15f, 0f), new Vector2(0f, 0.5f));
            ActiveFont.DrawOutline(Text, renderPosition + new Vector2(81f - textWidth / 2f, 0f), new Vector2(0f, 0.5f), Vector2.One, Color, 2f, Color.Black);
        }
Beispiel #4
0
        public override void Render()
        {
            base.Render();

            Player player = Scene.Tracker.GetEntity <Player>();

            if (player != null)
            {
                MTexture jumpIndicator = GFX.Game["ExtendedVariantMode/jumpindicator"];

                // draw no indicator in the case of infinite jumps.
                int jumpIndicatorsToDraw = settings.JumpCount == 6 ? 0 : JumpCount.GetJumpBuffer();

                int lines = 1 + (jumpIndicatorsToDraw - 1) / 5;

                for (int line = 0; line < lines; line++)
                {
                    int jumpIndicatorsToDrawOnLine = Math.Min(jumpIndicatorsToDraw, 5);
                    int totalWidth = jumpIndicatorsToDrawOnLine * 6 - 2;
                    for (int i = 0; i < jumpIndicatorsToDrawOnLine; i++)
                    {
                        jumpIndicator.DrawJustified(player.Center + new Vector2(-totalWidth / 2 + i * 6, -15f - line * 6), new Vector2(0f, 0.5f));
                    }
                    jumpIndicatorsToDraw -= jumpIndicatorsToDrawOnLine;
                }
            }
        }
Beispiel #5
0
 public override void Render()
 {
     if (textures != null && textures.Count > 0)
     {
         MTexture mtexture = textures[(int)frame];
         mtexture.DrawJustified(Position, new Vector2(0.5f, 1.0f), Color.White, scale);
     }
 }
Beispiel #6
0
        public override void Render()
        {
            if (ease > 0f)
            {
                Draw.Rect(-10f, -10f, 1940f, 1100f, Color.Black * ease * 0.4f);
            }
            base.Render();

            const float spacingX = 48f;
            const float spacingY = 64f;

            Vector2 posCenter = Position + new Vector2(1920f / 2f, 1080f / 2f);
            Vector2 pos;

            // Vector2 posInput = posCenter - new Vector2(spacingX * (digits.Length - 1f) / 2f, spacingY * 0.5f);
            Vector2 posInput = Position + new Vector2(384f, 1080f / 2f);

            pos = posInput;
            for (int i = 0; i < digits.Length; i++)
            {
                DrawOptionText(digits[i].ToString("X1"), pos + new Vector2(0f, wigglerDigits[i].Value * 8f), new Vector2(0f, 0.5f), Vector2.One, selectedDigit == i && !musicParamMenu.Focused, i <= 1);
                pos.X += spacingX;
            }

            // pos = posCenter + new Vector2(0f, spacingY * 0.5f + wigglerPath.Value * 2f);
            pos = posInput + new Vector2(spacingX * 2f, spacingY * 0.8f + wigglerPath.Value * 2f);
            ActiveFont.DrawOutline(selectedPath ?? "", pos, new Vector2(0f, 0.5f), Vector2.One * 0.75f, Color.White * ease, 2f, Color.Black * ease * ease * ease);

            pos = posInput + new Vector2(0f, spacingY * -0.8f + wigglerBankPath.Value * 2f);
            ActiveFont.DrawOutline(selectedBankPath ?? "", pos, new Vector2(0f, 0.5f), Vector2.One * 0.75f, Color.LightSlateGray * ease, 2f, Color.Black * ease * ease * ease);

            if (musicParamMenu.GetItems().Count > 0)
            {
                // Press...
                pos = posInput + new Vector2(0f, spacingY * 2f + wigglerBankPath.Value * 2f);
                ActiveFont.DrawOutline(Dialog.Clean("SOUNDTEST_AUDIOPARAMS_OPEN_1"), pos, new Vector2(0f, 0.5f), Vector2.One * 0.75f, Color.White * ease, 2f, Color.Black * ease * ease * ease);

                // ... [button image] ...
                pos.X += ActiveFont.Measure(Dialog.Clean("SOUNDTEST_AUDIOPARAMS_OPEN_1")).X * 0.75f + 10f;
                MTexture button = Input.GuiButton(Input.MenuJournal);
                button.DrawJustified(pos, new Vector2(0f, 0.5f), Color.White, 0.75f);
                pos.X += button.Width * 0.75f + 10f;

                // ... to edit Audio Params
                ActiveFont.DrawOutline(Dialog.Clean("SOUNDTEST_AUDIOPARAMS_OPEN_2"), pos, new Vector2(0f, 0.5f), Vector2.One * 0.75f, Color.White * ease, 2f, Color.Black * ease * ease * ease);
            }

            ActiveFont.DrawEdgeOutline(Dialog.Clean("soundtest_title"), Position + new Vector2(960f, 256f), new Vector2(0.5f, 0.5f), Vector2.One * 2f, Color.Gray, 4f, Color.DarkSlateBlue, 2f, Color.Black);

            if (musicParamMenuEase > 0f)
            {
                Draw.Rect(-10f, -10f, 1940f, 1100f, Color.Black * 0.95f * Ease.CubeInOut(musicParamMenuEase));
                musicParamMenu.Alpha = Ease.CubeInOut(musicParamMenuEase);
                musicParamMenu.Render();
            }
        }
            public override void Render(Vector2 center, float columnWidth)
            {
                float   num      = Width();
                Vector2 position = center + new Vector2(-num * 0.5f, 0f);

                for (int i = 0; i < icons.Length; i++)
                {
                    MTexture mtexture = MTN.Journal[icons[i]];
                    mtexture.DrawJustified(position, new Vector2(0f, 0.5f));
                    position.X += mtexture.Width + iconSpacing;
                }
            }
Beispiel #8
0
        public override void Render()
        {
            base.Render();

            float minX = float.MaxValue, maxX = float.MaxValue, minY = float.MaxValue, maxY = float.MaxValue;

            Player player = Scene.Tracker.GetEntity <Player>();

            if (player != null)
            {
                MTexture jumpIndicator = GFX.Game["ExtendedVariantMode/jumpindicator"];

                // draw no indicator in the case of infinite jumps.
                int jumpIndicatorsToDraw = settings.JumpCount == 6 ? 0 : JumpCount.GetJumpBuffer();

                int lines = 1 + (jumpIndicatorsToDraw - 1) / 5;

                for (int line = 0; line < lines; line++)
                {
                    int jumpIndicatorsToDrawOnLine = Math.Min(jumpIndicatorsToDraw, 5);
                    int totalWidth = jumpIndicatorsToDrawOnLine * 6 - 2;
                    for (int i = 0; i < jumpIndicatorsToDrawOnLine; i++)
                    {
                        Vector2 position = player.Center + new Vector2(-totalWidth / 2 + i * 6, -15f - line * 6);
                        jumpIndicator.DrawJustified(position, new Vector2(0f, 0.5f));

                        if (minX == float.MaxValue)
                        {
                            minX = maxX = position.X;
                            minY = maxY = position.Y;
                        }
                        else
                        {
                            minX = Math.Min(minX, position.X);
                            maxX = Math.Max(maxX, position.X);
                            minY = Math.Min(minY, position.Y);
                            maxY = Math.Max(maxY, position.Y);
                        }
                    }
                    jumpIndicatorsToDraw -= jumpIndicatorsToDrawOnLine;
                }
            }

            if (minX != float.MaxValue)
            {
                Collider = new Hitbox(maxX - minX + 4, maxY - minY + 3, minX, minY - 2);
            }
            else
            {
                Collider = null;
            }
        }
Beispiel #9
0
        public override void Render()
        {
            if (Everest.Flags.IsDisabled)
            {
                orig_Render();
                return;
            }

            if (CoreModule.Settings.ShowEverestTitleScreen)
            {
                logo        = everestLogo;
                title       = everestTitle;
                reflections = everestReflections;
            }
            else
            {
                logo        = vanillaLogo;
                title       = vanillaTitle;
                reflections = vanillaReflections;
            }

            float alphaPrev   = alpha;
            float textYPrev   = textY;
            float switchAlpha = Ease.CubeInOut(Calc.Clamp(Math.Max(switchingToVanilla, switchingToVanillaBack), 0f, 1f));

            alpha  = Calc.Clamp(alpha - switchAlpha, 0f, 1f);
            textY += switchAlpha * 200f;

            orig_Render();

            arrowToVanilla?.DrawJustified(new Vector2(1920f - 80f + (textY - 1000f) * 2f, 540f), new Vector2(1f, 0.5f), Color.White * alpha);

            updateTex?.DrawJustified(new Vector2(80f - 4f, textY + 8f * (1f - updateAlpha) + 2f), new Vector2(1f, 1f), Color.White * updateAlpha, 0.8f);

            alpha = alphaPrev;
            textY = textYPrev;

            if (switchAlpha > 0f)
            {
                Draw.Rect(0f, 0f, 1920f, 1080f, Color.Black * switchAlpha);
                float offs = 40f * (1f - switchAlpha);
                ActiveFont.Draw(Dialog.Clean("MENU_TITLESCREEN_RESTART_VANILLA"), new Vector2(960f + offs, 540f - 4f), new Vector2(0.5f, 1f), Vector2.One, Color.White * switchAlpha);
                Draw.Rect(960f - 200f + offs, 540f + 4f, 400f, 4f, Color.Black * switchAlpha * switchAlpha);
                Draw.HollowRect(960f - 200f + offs, 540f + 4f, 400f, 4f, Color.DarkSlateGray * switchAlpha);
                Draw.Rect(960f - 200f + offs, 540f + 4f, 400f * Calc.Clamp(Math.Max(switchingToVanilla, switchingToVanillaBack) / switchingToVanillaDuration, 0f, 1f), 4f, Color.White * switchAlpha);
            }
        }
Beispiel #10
0
        public void DrawTaskbar()
        {
            Draw.Rect(0f, Height - 80f, Width, 80f, taskbarColor);
            Draw.Rect(0f, Height - 80f, Width, 4f, Color.White * 0.5f);
            MTexture mtexture = Presentation.Gfx["desktop/startberry"];
            float    num      = 64f;
            float    num2     = num / mtexture.Height * 0.7f;
            string   text     = Presentation.GetCleanDialog("DESKTOP_STARTBUTTON");
            float    num3     = 0.6f;
            float    width    = mtexture.Width * num2 + ActiveFont.Measure(text).X *num3 + 32f;
            Vector2  vector   = new Vector2(8f, Height - 80f + 8f);

            Draw.Rect(vector.X, vector.Y, width, num, Color.White * 0.5f);
            mtexture.DrawJustified(vector + new Vector2(8f, num / 2f), new Vector2(0f, 0.5f), Color.White, Vector2.One * num2);
            ActiveFont.Draw(text, vector + new Vector2(mtexture.Width * num2 + 16f, num / 2f), new Vector2(0f, 0.5f), Vector2.One * num3, Color.Black * 0.8f);
            ActiveFont.Draw(time, new Vector2(Width - 24f, Height - 40f), new Vector2(1f, 0.5f), Vector2.One * 0.6f, Color.Black * 0.8f);
        }
Beispiel #11
0
        public override void Draw()
        {
            if (Icon == null)
            {
                return;
            }

            Icon.DrawJustified(
                Position,
                Vector2.One * 0.5f,
                color * alpha,
                new Vector2(
                    Size.X / Icon.Width,
                    Size.Y / Icon.Height
                    )
                );
        }
Beispiel #12
0
            public override void Render(Vector2 position, bool highlighted)
            {
                position += Offset;
                float alpha = Container.Alpha * Alpha;

                Color strokeColor = Color.Black * (alpha * alpha * alpha);

                if (Image == null || !GFX.Gui.Has(Image))
                {
                    return;
                }
                MTexture image = GFX.Gui[Image];

                if (ImageOutline)
                {
                    image.DrawOutlineJustified(position, Vector2.UnitY * 0.5f, ImageColor, ImageScale);
                }
                else
                {
                    image.DrawJustified(position, Vector2.UnitY * 0.5f, ImageColor, ImageScale);
                }
            }
            public override void Render(Vector2 position, bool highlighted)
            {
                Color textColor   = Color.Gray * Ease.CubeOut(Container.Alpha);
                Color strokeColor = Color.Black * Ease.CubeOut(Container.Alpha);
                Color btnColor    = Color.White * Ease.CubeOut(Container.Alpha);

                float taken = 0f;

                for (int i = 0; i < info.Count; i++)
                {
                    if (info[i] is string text)
                    {
                        taken += ActiveFont.Measure(text).X * 0.6f;
                    }
                    else if (info[i] is VirtualButton btn)
                    {
                        taken += Input.GuiButton(btn).Width * 0.6f;
                    }
                }

                Vector2 pos = position + new Vector2(Container.Width - taken, 0f) / 2f;

                for (int i = 0; i < info.Count; i++)
                {
                    if (info[i] is string text)
                    {
                        ActiveFont.DrawOutline(text, pos, new Vector2(0f, 0.5f), Vector2.One * 0.6f, textColor, 2f, strokeColor);
                        pos.X += ActiveFont.Measure(text).X * 0.6f;
                    }
                    else if (info[i] is VirtualButton btn)
                    {
                        MTexture tex = Input.GuiButton(btn);
                        tex.DrawJustified(pos, new Vector2(0f, 0.5f), btnColor, 0.6f);
                        pos.X += tex.Width * 0.6f;
                    }
                }
            }
Beispiel #14
0
 public override void Render()
 {
     orig_Render();
     updateTex?.DrawJustified(new Vector2(80f - 4f, textY + 8f * (1f - updateAlpha) + 2f), new Vector2(1f, 1f), Color.White * updateAlpha, 0.8f);
 }
        public override void Render()
        {
            if (Everest.Flags.IsDisabled)
            {
                orig_Render();
                return;
            }

            if (CoreModule.Settings.ShowEverestTitleScreen)
            {
                logo        = everestLogo;
                title       = everestTitle;
                reflections = everestReflections;
            }
            else
            {
                logo        = vanillaLogo;
                title       = vanillaTitle;
                reflections = vanillaReflections;
            }

            float alphaPrev   = alpha;
            float textYPrev   = textY;
            float switchAlpha = Ease.CubeInOut(Calc.Clamp(Math.Max(switchingToVanilla, switchingToVanillaBack), 0f, 1f));

            alpha  = Calc.Clamp(alpha - switchAlpha, 0f, 1f);
            textY += switchAlpha * 200f;

            orig_Render();

            arrowToVanilla?.DrawJustified(new Vector2(1920f - 80f + (textY - 1000f) * 2f, 540f), new Vector2(1f, 0.5f), Color.White * alpha);

            updateTex?.DrawJustified(new Vector2(80f - 4f, textY + 8f * (1f - updateAlpha) + 2f), new Vector2(1f, 1f), Color.White * updateAlpha, 0.8f);

            alpha = alphaPrev;
            textY = textYPrev;

            if (switchAlpha > 0f)
            {
                if (warningMessageMenu != null)
                {
                    // the restarting message should ease out as the warning message eases in.
                    switchAlpha -= Ease.CubeOut(warningEase);
                }

                Draw.Rect(0f, 0f, 1920f, 1080f, Color.Black * switchAlpha);
                float offs = 40f * (1f - switchAlpha);

                if (warningMessageMenu != null)
                {
                    // the restarting message should leave the opposite way it came from.
                    offs *= -1f;
                }

                ActiveFont.Draw(Dialog.Clean("MENU_TITLESCREEN_RESTART_VANILLA"), new Vector2(960f + offs, 540f - 4f), new Vector2(0.5f, 1f), Vector2.One, Color.White * switchAlpha);
                Draw.Rect(960f - 200f + offs, 540f + 4f, 400f, 4f, Color.Black * switchAlpha * switchAlpha);
                Draw.HollowRect(960f - 200f + offs, 540f + 4f, 400f, 4f, Color.DarkSlateGray * switchAlpha);
                Draw.Rect(960f - 200f + offs, 540f + 4f, 400f * Calc.Clamp(Math.Max(switchingToVanilla, switchingToVanillaBack) / switchingToVanillaDuration, 0f, 1f), 4f, Color.White * switchAlpha);
            }

            if (warningMessageMenu != null)
            {
                float warningAlpha = Ease.CubeOut(warningEase);
                float offs         = 40f * (1f - warningAlpha);
                warningMessageMenu.Position = new Vector2(960f + offs, 735f);
                warningMessageMenu.Alpha    = warningAlpha;
                ActiveFont.Draw(Dialog.Clean("MENU_TITLESCREEN_WARNING"), new Vector2(960f + offs, 285f), new Vector2(0.5f, 0f), Vector2.One * 1.2f, Color.OrangeRed * warningAlpha);
                ActiveFont.Draw(Dialog.Clean("MENU_TITLESCREEN_WARNING_TEXT"), new Vector2(960f + offs, 385f), new Vector2(0.5f, 0f), Vector2.One * 0.8f, Color.White * warningAlpha);
                ActiveFont.Draw(Dialog.Clean("MENU_TITLESCREEN_WARNING_TEXT2"), new Vector2(960f + offs, 510f), new Vector2(0.5f, 0f), Vector2.One * 0.8f, Color.White * warningAlpha);
            }
        }
        public override void Render()
        {
            GameplayRenderer.End();

            // render the edges of the lava rect.
            if (dirty)
            {
                Vector2 zero = Vector2.Zero;

                Vector2 topLeft     = zero;
                Vector2 topRight    = new Vector2(zero.X + Width, zero.Y);
                Vector2 bottomLeft  = new Vector2(zero.X, zero.Y + Height);
                Vector2 bottomRight = zero + new Vector2(Width, Height);

                Vector2 fadeOffset = new Vector2(Math.Min(Fade, Width / 2f), Math.Min(Fade, Height / 2f));
                vertCount = 0;
                if (OnlyMode == OnlyModes.OnlyLeft)
                {
                    Edge(ref vertCount, topRight, bottomRight, fadeOffset.X);
                    Quad(ref vertCount, topLeft, topRight - new Vector2(fadeOffset.X, 0f), bottomRight - new Vector2(fadeOffset.X, 0f), bottomLeft, CenterColor);
                }
                else if (OnlyMode == OnlyModes.OnlyRight)
                {
                    Edge(ref vertCount, bottomLeft, topLeft, fadeOffset.X);
                    Quad(ref vertCount, topLeft + new Vector2(fadeOffset.X, 0f), topRight, bottomRight, bottomLeft + new Vector2(fadeOffset.X, 0f), CenterColor);
                }

                dirty = false;
            }

            // render the vertices
            Camera camera = (Scene as Level).Camera;

            GFX.DrawVertices(Matrix.CreateTranslation(new Vector3(Entity.Position + Position, 0f)) * camera.Matrix, verts, vertCount);

            GameplayRenderer.Begin();

            Vector2 rectPosition = Entity.Position + Position;

            // render bubbles
            MTexture bubbleTexture = GFX.Game["particles/bubble"];

            for (int i = 0; i < bubbles.Length; i++)
            {
                bubbleTexture.DrawCentered(rectPosition + bubbles[i].Position, SurfaceColor * bubbles[i].Alpha);
            }

            // render surface bubbles
            for (int j = 0; j < surfaceBubbles.Length; j++)
            {
                if (surfaceBubbles[j].Y >= 0f)
                {
                    MTexture surfaceBubbleTexture = surfaceBubbleAnimations[surfaceBubbles[j].Animation][(int)surfaceBubbles[j].Frame];
                    int      bubbleOffset         = (int)(surfaceBubbles[j].Y / SurfaceStep);

                    float x;
                    if (OnlyMode == OnlyModes.OnlyLeft)
                    {
                        x = Width + 7f + Wave(bubbleOffset, Height);
                    }
                    else
                    {
                        x = 1f - Wave(bubbleOffset, Height);
                    }

                    surfaceBubbleTexture.DrawJustified(rectPosition +
                                                       new Vector2(x, OnlyMode == OnlyModes.OnlyRight ? Height - bubbleOffset * SurfaceStep : bubbleOffset * SurfaceStep),
                                                       new Vector2(1f, 0.5f), SurfaceColor);
                }
            }
        }
Beispiel #17
0
        public override void Render()
        {
            base.Render();

            float popupAlpha = 1f;
            float popupScale = 1f;

            if (Tracking?.Scene != Scene)
            {
                PopOut = true;
            }

            // Update can halt in the pause menu.
            if (PopIn || FadeOut || PopOut)
            {
                AnimationTime += Engine.RawDeltaTime;
                if (AnimationTime < 0.1f && PopIn)
                {
                    float t = AnimationTime / 0.1f;
                    // Pop in.
                    popupAlpha = Ease.CubeOut(t);
                    popupScale = Ease.ElasticOut(t);
                }
                else if (AnimationTime < 1f)
                {
                    // Stay.
                    popupAlpha = 1f;
                    popupScale = 1f;
                }
                else if (FadeOut)
                {
                    // Fade out.
                    if (AnimationTime < 2f)
                    {
                        float t = AnimationTime - 1f;
                        popupAlpha = 1f - Ease.CubeIn(t);
                        popupScale = 1f - 0.4f * Ease.CubeIn(t);
                    }
                    else
                    {
                        // Destroy.
                        RemoveSelf();
                        return;
                    }
                }
                else if (PopOut)
                {
                    // Pop out.
                    if (AnimationTime < 1.1f)
                    {
                        float t = (AnimationTime - 1f) / 0.1f;
                        popupAlpha  = 1f - Ease.CubeIn(t);
                        popupAlpha *= popupAlpha;
                        popupScale  = 1f - 0.4f * Ease.BounceIn(t);
                    }
                    else
                    {
                        // Destroy.
                        RemoveSelf();
                        return;
                    }
                }
                else
                {
                    AnimationTime = 1f;
                }
            }

            time += Engine.RawDeltaTime;

            MTexture icon = null;
            string   text = null;

            if (IsIcon(Value))
            {
                icon = GetIcon(Value, time);
            }
            else
            {
                text = Value;
            }

            float alpha = Alpha * popupAlpha;

            if (alpha <= 0f || (icon == null && string.IsNullOrWhiteSpace(text)))
            {
                return;
            }

            if (Tracking == null)
            {
                return;
            }

            Level level = SceneAs <Level>();

            if (level == null)
            {
                return;
            }

            if (Camera == null)
            {
                Camera = level.Camera;
            }
            if (Camera == null)
            {
                return;
            }

            Vector2 pos = Tracking.Position;

            // - name offset - popup offset
            pos.Y -= 16f + 4f;

            pos -= level.Camera.Position;
            pos *= 6f; // 1920 / 320

            if (Float)
            {
                pos.Y -= (float)Math.Sin(time * 2f) * 4f;
            }

            if (icon != null)
            {
                Vector2 size  = new Vector2(icon.Width, icon.Height);
                float   scale = (Size / Math.Max(size.X, size.Y)) * 0.5f * popupScale;
                size *= scale;

                pos = pos.Clamp(
                    0f + size.X * 0.5f, 0f + size.Y * 1f,
                    1920f - size.X * 0.5f, 1080f
                    );

                icon.DrawJustified(
                    pos,
                    new Vector2(0.5f, 1f),
                    Color.White * alpha,
                    Vector2.One * scale
                    );
            }
            else
            {
                Vector2 size  = ActiveFont.Measure(text);
                float   scale = (Size / Math.Max(size.X, size.Y)) * 0.5f * popupScale;
                size *= scale;

                pos = pos.Clamp(
                    0f + size.X * 0.5f, 0f + size.Y * 1f,
                    1920f - size.X * 0.5f, 1080f
                    );

                ActiveFont.DrawOutline(
                    text,
                    pos,
                    new Vector2(0.5f, 1f),
                    Vector2.One * scale,
                    Color.White * alpha,
                    2f,
                    Color.Black * alpha * alpha * alpha
                    );
            }
        }