diff --git a/UI/DraedonsLogUI.cs b/UI/DraedonsLogUI.cs index 0db909d24d..1c411c51a5 100644 --- a/UI/DraedonsLogUI.cs +++ b/UI/DraedonsLogUI.cs @@ -75,6 +75,7 @@ namespace CalamityMod.UI if (FadeTime >= FadeTimeMax - 4 && Active) { int textWidth = (int)(xScale * 2 * pageTexture.Width) - TextStartOffsetX; + textWidth = (int)(textWidth * Main.screenWidth / 2560f); List dialogLines = Utils.WordwrapString(placeholderText, Main.fontMouseText, textWidth, 250, out _).ToList(); dialogLines.RemoveAll(text => string.IsNullOrEmpty(text)); @@ -143,12 +144,12 @@ namespace CalamityMod.UI bool onNextPage = i - startingLine > TotalLinesPerPage; if (dialogLines[i] != null) { - int textDrawPositionX = Main.screenWidth / 2 - pageTexture.Width * 2 - TextStartOffsetX; - int textDrawPositionY = 50 + (i - startingLine) * 24 + (int)yPageTop; + int textDrawPositionX = Main.screenWidth / 2 - (int)((pageTexture.Width * 2 - TextStartOffsetX) * Main.screenWidth / 2560f); + int textDrawPositionY = 50 + (int)((i - startingLine) * 24 * Main.screenHeight / 1440f) + (int)yPageTop; if (onNextPage) { - textDrawPositionX = Main.screenWidth / 2 + (int)(TextStartOffsetX * 1.5); - textDrawPositionY = 50 + (i - startingLine - (TotalLinesPerPage + 1)) * 24 + (int)yPageTop; + textDrawPositionX = Main.screenWidth / 2 + (int)(TextStartOffsetX * 1.5 * Main.screenWidth / 2560f); + textDrawPositionY = 50 + (int)((i - startingLine - (TotalLinesPerPage + 1)) * 24 * Main.screenHeight / 1440f) + (int)yPageTop; } Color drawColor = Color.Lerp(Color.Cyan, Color.DarkCyan, (float)Math.Cos(i * 0.4) * 0.5f + 0.5f); @@ -159,7 +160,8 @@ namespace CalamityMod.UI textDrawPositionY, drawColor, Color.Black, - Vector2.Zero); + Vector2.Zero, + Main.screenWidth / 2560f); } } }