From b2b661f6037f3e0a7acdd97f45516df9513ed04e Mon Sep 17 00:00:00 2001 From: Atilla Lonny Date: Sun, 25 Sep 2022 12:58:23 -0400 Subject: [PATCH 1/4] Use accurate offsets for InitialControlSet positions --- EndlessClient/ControlSets/InitialControlSet.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EndlessClient/ControlSets/InitialControlSet.cs b/EndlessClient/ControlSets/InitialControlSet.cs index fedde93fc..1859592c5 100644 --- a/EndlessClient/ControlSets/InitialControlSet.cs +++ b/EndlessClient/ControlSets/InitialControlSet.cs @@ -134,7 +134,7 @@ private IXNAButton MainButtonCreationHelper(GameControlIdentifier whichControl) var outSource = new Rectangle(0, i * heightFactor, widthFactor, heightFactor); var overSource = new Rectangle(widthFactor, i * heightFactor, widthFactor, heightFactor); - return new XNAButton(_mainButtonTexture, new Vector2(26, 278 + i * 40), outSource, overSource); + return new XNAButton(_mainButtonTexture, new Vector2(25, 280 + i * 40), outSource, overSource); } private IXNALabel GetVersionInfoLabel() @@ -148,8 +148,8 @@ private IXNALabel GetVersionInfoLabel() _configProvider.VersionBuild, _configProvider.Host, _configProvider.Port), - ForeColor = Color.Black, - DrawArea = new Rectangle(20, 459, 1, 1) + ForeColor = Color.FromNonPremultiplied(190, 170, 150, 255), + DrawArea = new Rectangle(28, 457, 1, 1) }; } From 50c65448c07000f23fcf2f0f978c1d5a6429fb0b Mon Sep 17 00:00:00 2001 From: Atilla Lonny Date: Sun, 25 Sep 2022 13:46:48 -0400 Subject: [PATCH 2/4] Fix parsing of host command line argument --- EndlessClient/GameExecution/GameRunnerBase.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/EndlessClient/GameExecution/GameRunnerBase.cs b/EndlessClient/GameExecution/GameRunnerBase.cs index 93f586b02..84b7db71e 100644 --- a/EndlessClient/GameExecution/GameRunnerBase.cs +++ b/EndlessClient/GameExecution/GameRunnerBase.cs @@ -6,6 +6,7 @@ using EOLib.Graphics; using EOLib.Localization; using System; +using System.Net; #if !LINUX using System.Windows.Forms; @@ -71,8 +72,14 @@ public virtual bool SetupDependencies() if (string.Equals(arg, "--host") && i < _args.Length - 1) { var host = _args[i + 1]; - _registry.Resolve() - .Host = host; + + if (IPEndPoint.TryParse(host, out var endpoint)) { + _registry.Resolve() + .Host = endpoint.Address.ToString(); + + _registry.Resolve() + .Port = endpoint.Port; + } i++; } From ac0622778e867b2dfaea626451c26a2a536c7903 Mon Sep 17 00:00:00 2001 From: Atilla Lonny Date: Sun, 25 Sep 2022 14:04:44 -0400 Subject: [PATCH 3/4] Fix alignment of EOMessageBox caption --- EndlessClient/Dialogs/EOMessageBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EndlessClient/Dialogs/EOMessageBox.cs b/EndlessClient/Dialogs/EOMessageBox.cs index 2e9e1b3c4..2d049df0e 100644 --- a/EndlessClient/Dialogs/EOMessageBox.cs +++ b/EndlessClient/Dialogs/EOMessageBox.cs @@ -59,7 +59,7 @@ public EOMessageBox(INativeGraphicsManager graphicsManager, ForeColor = ColorConstants.LightYellowText, Text = caption, TextWidth = 254, - DrawPosition = useSmallHeader ? new Vector2(18, 12) : new Vector2(59, 23) + DrawPosition = useSmallHeader ? new Vector2(18, 12) : new Vector2(60, 26) }; _captionLabel.SetParentControl(this); From dea5baa58ba9370c03a5fb28db1fcf2d017fcaaf Mon Sep 17 00:00:00 2001 From: Atilla Lonny Date: Sun, 25 Sep 2022 16:10:49 -0400 Subject: [PATCH 4/4] Fix wrapping of EOMessageBox message label --- EndlessClient/Dialogs/EOMessageBox.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/EndlessClient/Dialogs/EOMessageBox.cs b/EndlessClient/Dialogs/EOMessageBox.cs index 2d049df0e..e142b6386 100644 --- a/EndlessClient/Dialogs/EOMessageBox.cs +++ b/EndlessClient/Dialogs/EOMessageBox.cs @@ -48,9 +48,11 @@ public EOMessageBox(INativeGraphicsManager graphicsManager, AutoSize = true, ForeColor = ColorConstants.LightYellowText, Text = message, - TextWidth = 254, - DrawPosition = new Vector2(18, useSmallHeader ? 40 : 57) + TextWidth = 240, + DrawPosition = new Vector2(21, useSmallHeader ? 40 : 62), + WrapBehavior = WrapBehavior.WrapToNewLine, }; + _messageLabel.SetParentControl(this); _captionLabel = new XNALabel(Constants.FontSize10) @@ -59,7 +61,7 @@ public EOMessageBox(INativeGraphicsManager graphicsManager, ForeColor = ColorConstants.LightYellowText, Text = caption, TextWidth = 254, - DrawPosition = useSmallHeader ? new Vector2(18, 12) : new Vector2(60, 26) + DrawPosition = useSmallHeader ? new Vector2(18, 12) : new Vector2(60, 27) }; _captionLabel.SetParentControl(this);