]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Changes for SplitContainer Engine PR (#20383)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sun, 8 Oct 2023 16:28:04 +0000 (03:28 +1100)
committerGitHub <noreply@github.com>
Sun, 8 Oct 2023 16:28:04 +0000 (03:28 +1100)
Content.Client/UserInterface/Controls/RecordedSplitContainer.cs
Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs

index b255ac15a30676078ad8b88459a6acde5a03f3cf..fd217bc7e860bf681b1636d94e1e7af9219a92f4 100644 (file)
@@ -1,7 +1,5 @@
 using System.Numerics;
-using Robust.Client.UserInterface;
 using Robust.Client.UserInterface.Controls;
-using Robust.Shared.Input;
 
 namespace Content.Client.UserInterface.Controls;
 
@@ -10,8 +8,6 @@ namespace Content.Client.UserInterface.Controls;
 /// </summary>
 public sealed class RecordedSplitContainer : SplitContainer
 {
-    public Action<Vector2, Vector2>? OnSplitResizeFinish;
-
     public double? DesiredSplitCenter;
 
     protected override Vector2 ArrangeOverride(Vector2 finalSize)
@@ -30,24 +26,4 @@ public sealed class RecordedSplitContainer : SplitContainer
 
         return base.ArrangeOverride(finalSize);
     }
-
-    protected override void KeyBindUp(GUIBoundKeyEventArgs args)
-    {
-        base.KeyBindUp(args);
-
-        if (args.Function != EngineKeyFunctions.UIClick)
-        {
-            return;
-        }
-
-        if (ChildCount != 2)
-        {
-            return;
-        }
-
-        var first = GetChild(0);
-        var second = GetChild(1);
-
-        OnSplitResizeFinish?.Invoke(first.Size, second.Size);
-    }
 }
index 9aef78fd85696346808ebf236ba303f417f77166..41c4a85e7eecdb142d333368dc472541f4d97aaf 100644 (file)
@@ -24,7 +24,7 @@ public sealed partial class SeparatedChatGameScreen : InGameScreen
         SetAnchorAndMarginPreset(Hotbar, LayoutPreset.BottomWide, margin: 5);
         SetAnchorAndMarginPreset(Alerts, LayoutPreset.CenterRight, margin: 10);
 
-        ScreenContainer.OnSplitResizeFinish += (first, second) =>
+        ScreenContainer.OnSplitResizeFinished += () =>
             OnChatResized?.Invoke(new Vector2(ScreenContainer.SplitFraction, 0));
     }