using Content.Client.Stylesheets.SheetletConfigs; using Content.Client.Stylesheets.Stylesheets; using Robust.Client.Graphics; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using static Content.Client.Stylesheets.StylesheetHelpers; namespace Content.Client.Stylesheets.Sheetlets; [CommonSheetlet] public sealed class TabContainerSheetlet : Sheetlet where T: PalettedStylesheet, ITabContainerConfig { public override StyleRule[] GetRules(T sheet, object config) { ITabContainerConfig tabCfg = sheet; var tabContainerPanel = sheet.GetTextureOr(tabCfg.TabContainerPanelPath, NanotrasenStylesheet.TextureRoot) .IntoPatch(StyleBox.Margin.All, 2); var tabContainerBoxActive = new StyleBoxFlat(sheet.SecondaryPalette.Element); tabContainerBoxActive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5); var tabContainerBoxInactive = new StyleBoxFlat(sheet.SecondaryPalette.Background); tabContainerBoxInactive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5); return [ E() .Prop(TabContainer.StylePropertyPanelStyleBox, tabContainerPanel) .Prop(TabContainer.StylePropertyTabStyleBox, tabContainerBoxActive) .Prop(TabContainer.StylePropertyTabStyleBoxInactive, tabContainerBoxInactive), ]; } }