mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-20 23:17:43 +03:00
# Changelog 🆑 - fix: Fixed alerts being halfway down the screen Signed-off-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> (cherry picked from commit 0bf6989e503838adcee53c561ec101564282260f)
40 lines
1.5 KiB
C#
40 lines
1.5 KiB
C#
using System.Numerics;
|
|
using Content.Client.UserInterface.Systems.Chat.Widgets;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
namespace Content.Client.UserInterface.Screens;
|
|
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class SeparatedChatGameScreen : InGameScreen
|
|
{
|
|
public SeparatedChatGameScreen()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
|
|
AutoscaleMaxResolution = new Vector2i(1080, 770);
|
|
|
|
SetAnchorPreset(ScreenContainer, LayoutPreset.Wide);
|
|
SetAnchorPreset(ViewportContainer, LayoutPreset.Wide);
|
|
SetAnchorPreset(MainViewport, LayoutPreset.Wide);
|
|
SetAnchorAndMarginPreset(Inventory, LayoutPreset.BottomLeft, margin: 5);
|
|
SetAnchorAndMarginPreset(TopLeftContainer, LayoutPreset.TopLeft, margin: 10);
|
|
SetAnchorAndMarginPreset(Ghost, LayoutPreset.BottomWide, margin: 80);
|
|
SetAnchorAndMarginPreset(Hotbar, LayoutPreset.BottomWide, margin: 5);
|
|
SetAnchorAndMarginPreset(Alerts, LayoutPreset.TopRight, margin: 10);
|
|
SetAnchorAndMarginPreset(Targeting, LayoutPreset.BottomRight, margin: 5);
|
|
|
|
ScreenContainer.OnSplitResizeFinished += () =>
|
|
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;
|
|
}
|
|
}
|