Files
wylab-station-14/Content.Client/Stylesheets/Sheetlets/StripebackSheetlet.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

40 lines
1.4 KiB
C#

using Content.Client.Stylesheets.Palette;
using Content.Client.Stylesheets.SheetletConfigs;
using Content.Client.Stylesheets.Stylesheets;
using Content.Client.UserInterface.Controls;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using static Content.Client.Stylesheets.StylesheetHelpers;
namespace Content.Client.Stylesheets.Sheetlets;
[CommonSheetlet]
public sealed class StripebackSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, IStripebackConfig
{
public override StyleRule[] GetRules(T sheet, object config)
{
IStripebackConfig stripebackCfg = sheet;
var stripeTex = sheet.GetTextureOr(stripebackCfg.StripebackPath, NanotrasenStylesheet.TextureRoot);
var stripeBack = new StyleBoxTexture
{
Texture = stripeTex,
Mode = StyleBoxTexture.StretchMode.Tile,
Modulate = sheet.PrimaryPalette.BackgroundDark
};
var stripeBackWarning = new StyleBoxTexture {
Texture = stripeTex,
Mode = StyleBoxTexture.StretchMode.Tile,
Modulate = Palettes.Amber.Element
};
return
[
E<StripeBack>()
.Prop(StripeBack.StylePropertyBackground, stripeBack),
E<StripeBack>().Class(StyleClass.StatusWarning)
.Prop(StripeBack.StylePropertyBackground, stripeBackWarning),
];
}
}