From ba4fb75edb49912cafb456b073dbd931f0269f12 Mon Sep 17 00:00:00 2001 From: Tad Taylor Date: Thu, 22 Feb 2024 15:42:46 -0700 Subject: [PATCH 1/3] Fix a gump animation bug --- .../Game/UI/Controls/Control.cs | 27 +++++++++++++++---- .../Game/UI/Gumps/VersionHistory.cs | 5 +++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/ClassicUO.Client/Game/UI/Controls/Control.cs b/src/ClassicUO.Client/Game/UI/Controls/Control.cs index b591bb7ab..beba9e656 100644 --- a/src/ClassicUO.Client/Game/UI/Controls/Control.cs +++ b/src/ClassicUO.Client/Game/UI/Controls/Control.cs @@ -315,6 +315,28 @@ public virtual bool Draw(UltimaBatcher2D batcher, int x, int y) } batcher.ClipBegin(x + offset, y + offset, Width - (offset * 2), Height - (offset * 2)); + + for (int i = 0; i < Children.Count; i++) + { + if (Children.Count <= i) + { + break; + } + Control c = Children.ElementAt(i); + + if (c != null && (c.Page == 0 || c.Page == ActivePage)) + { + if (c.IsVisible) + { + c.Draw(batcher, c.X + x, c.Y + y); + } + } + } + + DrawDebug(batcher, x, y); + + batcher.ClipEnd(); + return true; } for (int i = 0; i < Children.Count; i++) @@ -336,11 +358,6 @@ public virtual bool Draw(UltimaBatcher2D batcher, int x, int y) DrawDebug(batcher, x, y); - if (delayedDispose) - { - batcher.ClipEnd(); - } - return true; } diff --git a/src/ClassicUO.Client/Game/UI/Gumps/VersionHistory.cs b/src/ClassicUO.Client/Game/UI/Gumps/VersionHistory.cs index 623446d79..dadec02ae 100644 --- a/src/ClassicUO.Client/Game/UI/Gumps/VersionHistory.cs +++ b/src/ClassicUO.Client/Game/UI/Gumps/VersionHistory.cs @@ -8,8 +8,11 @@ namespace ClassicUO.Game.UI.Gumps internal class VersionHistory : Gump { private static string[] updateTexts = { + "/c[white][3.22.0]/cd\n" + + "- Changes to improve gump closing animations", + "/c[white][3.21.2]/cd\n" + - "-A bugfix release for 3.21 causing crashes", + "- A bugfix release for 3.21 causing crashes", "/c[white][3.21.0]/cd\n" + "- A few bug fixes\n" + From d0fc10b75a32e5cc013bbb6d672a1d55363d7bfb Mon Sep 17 00:00:00 2001 From: Tad Taylor Date: Thu, 22 Feb 2024 15:44:33 -0700 Subject: [PATCH 2/3] Remove gump animations from server-side gumps --- src/ClassicUO.Client/Game/UI/Controls/Control.cs | 2 +- src/ClassicUO.Client/Game/UI/Gumps/VersionHistory.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ClassicUO.Client/Game/UI/Controls/Control.cs b/src/ClassicUO.Client/Game/UI/Controls/Control.cs index beba9e656..deb790091 100644 --- a/src/ClassicUO.Client/Game/UI/Controls/Control.cs +++ b/src/ClassicUO.Client/Game/UI/Controls/Control.cs @@ -1062,7 +1062,7 @@ public virtual void Dispose() if (this is Gumps.Gump) { - if (!delayedDispose && World.InGame && Parent == null && ProfileManager.CurrentProfile != null && ProfileManager.CurrentProfile.EnableGumpCloseAnimation) + if (!delayedDispose && !IsFromServer && World.InGame && Parent == null && ProfileManager.CurrentProfile != null && ProfileManager.CurrentProfile.EnableGumpCloseAnimation) { delayedDispose = true; return; diff --git a/src/ClassicUO.Client/Game/UI/Gumps/VersionHistory.cs b/src/ClassicUO.Client/Game/UI/Gumps/VersionHistory.cs index dadec02ae..25b8400ec 100644 --- a/src/ClassicUO.Client/Game/UI/Gumps/VersionHistory.cs +++ b/src/ClassicUO.Client/Game/UI/Gumps/VersionHistory.cs @@ -8,7 +8,7 @@ namespace ClassicUO.Game.UI.Gumps internal class VersionHistory : Gump { private static string[] updateTexts = { - "/c[white][3.22.0]/cd\n" + + "/c[white][3.21.3]/cd\n" + "- Changes to improve gump closing animations", "/c[white][3.21.2]/cd\n" + From 4b18fbce6d151a59094a94d22c8705a177c38b5a Mon Sep 17 00:00:00 2001 From: Tad Taylor Date: Thu, 22 Feb 2024 15:45:12 -0700 Subject: [PATCH 3/3] Update version --- src/ClassicUO.Client/ClassicUO.Client.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ClassicUO.Client/ClassicUO.Client.csproj b/src/ClassicUO.Client/ClassicUO.Client.csproj index ef724ed28..2d3f7767c 100644 --- a/src/ClassicUO.Client/ClassicUO.Client.csproj +++ b/src/ClassicUO.Client/ClassicUO.Client.csproj @@ -5,8 +5,8 @@ cuoicon.ico ClassicUO ClassicUO - 3.21.2 - 3.21.2 + 3.21.3 + 3.21.3