Store chat size (#14299)
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
using Content.Client.UserInterface.Systems.Chat.Widgets;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
|
||||
namespace Content.Client.UserInterface.Screens;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class SeparatedChatGameScreen : UIScreen
|
||||
public sealed partial class SeparatedChatGameScreen : InGameScreen
|
||||
{
|
||||
public SeparatedChatGameScreen()
|
||||
{
|
||||
@@ -20,5 +22,16 @@ public sealed partial class SeparatedChatGameScreen : UIScreen
|
||||
SetAnchorAndMarginPreset(Ghost, LayoutPreset.BottomWide, margin: 80);
|
||||
SetAnchorAndMarginPreset(Hotbar, LayoutPreset.BottomWide, margin: 5);
|
||||
SetAnchorAndMarginPreset(Alerts, LayoutPreset.CenterRight, margin: 10);
|
||||
|
||||
ScreenContainer.OnSplitResizeFinish += (first, second) =>
|
||||
OnChatResized?.Invoke(new Vector2(ScreenContainer.SplitFraction, 0));
|
||||
}
|
||||
|
||||
public override ChatBox ChatBox => GetWidget<ChatBox>()!;
|
||||
|
||||
public override void SetChatSize(Vector2 size)
|
||||
{
|
||||
ScreenContainer.DesiredSplitCenter = size.X;
|
||||
ScreenContainer.ResizeMode = SplitContainer.SplitResizeMode.RespectChildrenMinSize;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user