From 299e0a55459240a0622cb2998e142375c0fb255f Mon Sep 17 00:00:00 2001 From: Brandon Li Date: Wed, 10 Jul 2024 23:05:14 -0400 Subject: [PATCH] change `ButtonHovered` etc to `PseudoHovered` etc Signed-off-by: Brandon Li --- .../Redux/Sheetlets/ButtonSheetlet.cs | 16 ++++++++-------- .../Redux/Sheetlets/Hud/ExamineButtonSheetlet.cs | 8 ++++---- .../Redux/Sheetlets/ListContainerSheetlet.cs | 8 ++++---- .../Redux/Sheetlets/ScrollbarSheetlet.cs | 8 ++++---- .../Stylesheets/Redux/StylesheetHelpers.cs | 10 +++++----- Content.Client/Stylesheets/Redux/todo.md | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Content.Client/Stylesheets/Redux/Sheetlets/ButtonSheetlet.cs b/Content.Client/Stylesheets/Redux/Sheetlets/ButtonSheetlet.cs index 11628dcf308c59..a9a3c6698f74fd 100644 --- a/Content.Client/Stylesheets/Redux/Sheetlets/ButtonSheetlet.cs +++ b/Content.Client/Stylesheets/Redux/Sheetlets/ButtonSheetlet.cs @@ -72,10 +72,10 @@ public static void MakeButtonRules(IButtonConfig _, { rules.AddRange(new StyleRule[] { - E().MaybeClass(styleclass).ButtonNormal().Modulate(palette.Element), - E().MaybeClass(styleclass).ButtonHovered().Modulate(palette.HoveredElement), - E().MaybeClass(styleclass).ButtonPressed().Modulate(palette.PressedElement), - E().MaybeClass(styleclass).ButtonDisabled().Modulate(palette.DisabledElement), + E().MaybeClass(styleclass).PseudoNormal().Modulate(palette.Element), + E().MaybeClass(styleclass).PseudoHovered().Modulate(palette.HoveredElement), + E().MaybeClass(styleclass).PseudoPressed().Modulate(palette.PressedElement), + E().MaybeClass(styleclass).PseudoDisabled().Modulate(palette.DisabledElement), }); } @@ -86,12 +86,12 @@ public static void MakeButtonRules(IButtonConfig _, { rules.AddRange(new StyleRule[] { - E().MaybeClass(styleclass).ButtonNormal().Prop(Control.StylePropertyModulateSelf, palette.Element), - E().MaybeClass(styleclass).ButtonHovered().Prop(Control.StylePropertyModulateSelf, palette.HoveredElement), - E().MaybeClass(styleclass).ButtonPressed().Prop(Control.StylePropertyModulateSelf, palette.PressedElement), + E().MaybeClass(styleclass).PseudoNormal().Prop(Control.StylePropertyModulateSelf, palette.Element), + E().MaybeClass(styleclass).PseudoHovered().Prop(Control.StylePropertyModulateSelf, palette.HoveredElement), + E().MaybeClass(styleclass).PseudoPressed().Prop(Control.StylePropertyModulateSelf, palette.PressedElement), E() .MaybeClass(styleclass) - .ButtonDisabled() + .PseudoDisabled() .Prop(Control.StylePropertyModulateSelf, palette.DisabledElement), }); } diff --git a/Content.Client/Stylesheets/Redux/Sheetlets/Hud/ExamineButtonSheetlet.cs b/Content.Client/Stylesheets/Redux/Sheetlets/Hud/ExamineButtonSheetlet.cs index a9de7f5802d6ca..34f9a5f7df7535 100644 --- a/Content.Client/Stylesheets/Redux/Sheetlets/Hud/ExamineButtonSheetlet.cs +++ b/Content.Client/Stylesheets/Redux/Sheetlets/Hud/ExamineButtonSheetlet.cs @@ -28,19 +28,19 @@ public override StyleRule[] GetRules(PalettedStylesheet sheet, object config) .Prop(ContainerButton.StylePropertyStyleBox, buttonContext), E() .Class(ExamineButton.StyleClassExamineButton) - .ButtonNormal() + .PseudoNormal() .Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContext), E() .Class(ExamineButton.StyleClassExamineButton) - .ButtonHovered() + .PseudoHovered() .Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContextHover), E() .Class(ExamineButton.StyleClassExamineButton) - .ButtonPressed() + .PseudoPressed() .Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContextPressed), E() .Class(ExamineButton.StyleClassExamineButton) - .ButtonDisabled() + .PseudoDisabled() .Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContextDisabled), ]; } diff --git a/Content.Client/Stylesheets/Redux/Sheetlets/ListContainerSheetlet.cs b/Content.Client/Stylesheets/Redux/Sheetlets/ListContainerSheetlet.cs index 3234249466413f..5ff1515a18e8e2 100644 --- a/Content.Client/Stylesheets/Redux/Sheetlets/ListContainerSheetlet.cs +++ b/Content.Client/Stylesheets/Redux/Sheetlets/ListContainerSheetlet.cs @@ -21,19 +21,19 @@ public override StyleRule[] GetRules(PalettedStylesheet sheet, object config) .Box(box), E() .Class(ListContainer.StyleClassListContainerButton) - .ButtonNormal() + .PseudoNormal() .Modulate(new Color(55, 55, 68)), E() .Class(ListContainer.StyleClassListContainerButton) - .ButtonHovered() + .PseudoHovered() .Modulate(new Color(75, 75, 86)), E() .Class(ListContainer.StyleClassListContainerButton) - .ButtonPressed() + .PseudoPressed() .Modulate(new Color(75, 75, 86)), E() .Class(ListContainer.StyleClassListContainerButton) - .ButtonDisabled() + .PseudoDisabled() .Modulate(new Color(10, 10, 12)), ]; } diff --git a/Content.Client/Stylesheets/Redux/Sheetlets/ScrollbarSheetlet.cs b/Content.Client/Stylesheets/Redux/Sheetlets/ScrollbarSheetlet.cs index 1f22e3e60dd026..9075ae034d59c5 100644 --- a/Content.Client/Stylesheets/Redux/Sheetlets/ScrollbarSheetlet.cs +++ b/Content.Client/Stylesheets/Redux/Sheetlets/ScrollbarSheetlet.cs @@ -48,11 +48,11 @@ public override StyleRule[] GetRules(PalettedStylesheet sheet, object config) return [ E().Prop(ScrollBar.StylePropertyGrabber, vScrollBarGrabberNormal), - E().ButtonHovered().Prop(ScrollBar.StylePropertyGrabber, vScrollBarGrabberHover), - E().ButtonPressed().Prop(ScrollBar.StylePropertyGrabber, vScrollBarGrabberGrabbed), + E().PseudoHovered().Prop(ScrollBar.StylePropertyGrabber, vScrollBarGrabberHover), + E().PseudoPressed().Prop(ScrollBar.StylePropertyGrabber, vScrollBarGrabberGrabbed), E().Prop(ScrollBar.StylePropertyGrabber, hScrollBarGrabberNormal), - E().ButtonHovered().Prop(ScrollBar.StylePropertyGrabber, hScrollBarGrabberHover), - E().ButtonPressed().Prop(ScrollBar.StylePropertyGrabber, hScrollBarGrabberGrabbed), + E().PseudoHovered().Prop(ScrollBar.StylePropertyGrabber, hScrollBarGrabberHover), + E().PseudoPressed().Prop(ScrollBar.StylePropertyGrabber, hScrollBarGrabberGrabbed), ]; } } diff --git a/Content.Client/Stylesheets/Redux/StylesheetHelpers.cs b/Content.Client/Stylesheets/Redux/StylesheetHelpers.cs index 9d343b52b07472..0aac6a83af84d9 100644 --- a/Content.Client/Stylesheets/Redux/StylesheetHelpers.cs +++ b/Content.Client/Stylesheets/Redux/StylesheetHelpers.cs @@ -93,24 +93,24 @@ public static MutableSelector AlignMode(this MutableSelector selector, Label.Ali return selector.Prop(Label.StylePropertyAlignMode, mode); } - // Button helpers + // Pseudo class helpers - public static MutableSelectorElement ButtonNormal(this MutableSelectorElement selector) + public static MutableSelectorElement PseudoNormal(this MutableSelectorElement selector) { return selector.Pseudo(ContainerButton.StylePseudoClassNormal); } - public static MutableSelectorElement ButtonHovered(this MutableSelectorElement selector) + public static MutableSelectorElement PseudoHovered(this MutableSelectorElement selector) { return selector.Pseudo(ContainerButton.StylePseudoClassHover); } - public static MutableSelectorElement ButtonPressed(this MutableSelectorElement selector) + public static MutableSelectorElement PseudoPressed(this MutableSelectorElement selector) { return selector.Pseudo(ContainerButton.StylePseudoClassPressed); } - public static MutableSelectorElement ButtonDisabled(this MutableSelectorElement selector) + public static MutableSelectorElement PseudoDisabled(this MutableSelectorElement selector) { return selector.Pseudo(ContainerButton.StylePseudoClassDisabled); } diff --git a/Content.Client/Stylesheets/Redux/todo.md b/Content.Client/Stylesheets/Redux/todo.md index 5aab752081ae20..9e53ef3b52dd5d 100644 --- a/Content.Client/Stylesheets/Redux/todo.md +++ b/Content.Client/Stylesheets/Redux/todo.md @@ -38,7 +38,7 @@ - Eh, most of it anyway - [x] Make all `StyleClass` conform to naming conventions - [x] Separate out `FontKind` maybe -- [ ] change `ButtonHovered` and friends to `PseudoHovered` +- [x] change `ButtonHovered` and friends to `PseudoHovered` - [x] `IPanelPalette` is unnecessary now - [ ] What the fuck is `StyleSpace` get rid of it - [ ] Fix the codepen