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 ProgressBarSheetlet : Sheetlet { public override StyleRule[] GetRules(PalettedStylesheet sheet, object config) { // TODO: 1) hardcoded colors, 2) yuck var progressBarBackground = new StyleBoxFlat { BackgroundColor = new Color(0.25f, 0.25f, 0.25f), }; progressBarBackground.SetContentMarginOverride(StyleBox.Margin.Vertical, 14.5f); var progressBarForeground = new StyleBoxFlat { BackgroundColor = new Color(0.25f, 0.50f, 0.25f), }; progressBarForeground.SetContentMarginOverride(StyleBox.Margin.Vertical, 14.5f); return [ E() .Prop(ProgressBar.StylePropertyBackground, progressBarBackground) .Prop(ProgressBar.StylePropertyForeground, progressBarForeground), ]; } }