Files
wylab-station-14/Content.Client/UserInterface/Controls/LayeredImageContainer.xaml.cs
wylab b840ef7255 Порт: Улучшение UX и дизайна консоли связи
Портировано из space-wizards/space-station-14#41899

Изменения:
- Добавлено подтверждение при изменении уровня угрозы (предотвращает случайные изменения)
- Разделены кнопки вызова/отзыва шаттла в отдельные UI области
- Созданы отдельные вкладки для объявлений и трансляции
- Разбито монолитное меню на 3 виджета: AlertLevelControls, MessagingControls, ShuttleControls
- Добавлен LCD-дисплей с таймером обратного отсчета
- Обновлены текстуры и шрифты

Локализация:
- Полностью переведены новые строки на русский язык в стиле Corvax

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 05:45:40 +01:00

47 lines
1.8 KiB
C#

using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.UserInterface.Controls;
/// <summary>
/// A generic container which can layer multiple styleboxes over/under the
/// contents of of the child controls. This container contains two forground
/// panels and two background panels, each of which can be styled independently.
/// Background panels will be rendered underneath the child controls, while
/// foreground panels will be rendered above. The use of two panels for each
/// level allows for one level to use a stylized graphic, typically including
/// some modulation to color-match the surrounding UI, while the second level
/// can be used for shadows or highlights, which would typically not have such
/// modulation.
/// </summary>
[GenerateTypedNameReferences]
public partial class LayeredImageContainer : Container
{
// Adds a raised border with rounded corners around a UI element
public const string StyleClassPanelMount = "PanelMount";
// Bright AngleRect with a subtle outline
public const string StyleClassBrightAngleRect = "BrightAngleRectOutline";
// The least amount of margin that a child needs to have to avoid drawing under
// undesirable parts of the images. Children can add additional margins if desired
public const string StylePropertyMinimumContentMargin = "MinimumContentMargin";
public LayeredImageContainer()
{
RobustXamlLoader.Load(this);
XamlChildren = ContentsContainer.Children;
}
protected override void StylePropertiesChanged()
{
if (TryGetStyleProperty<Thickness>(StylePropertyMinimumContentMargin, out var contentMargin))
{
ContentsContainer.Margin = contentMargin;
}
}
}