Verb confirmation (#6137)

This commit is contained in:
ShadowCommander
2022-01-13 06:28:17 -08:00
committed by GitHub
parent 007caf26b7
commit 4f80dfda0d
8 changed files with 117 additions and 12 deletions

View File

@@ -446,6 +446,9 @@ namespace Content.Client.Stylesheets
};
insetBack.SetPatchMargin(StyleBox.Margin.All, 10);
var contextMenuExpansionTexture = resCache.GetTexture("/Textures/Interface/VerbIcons/group.svg.192dpi.png");
var verbMenuConfirmationTexture = resCache.GetTexture("/Textures/Interface/VerbIcons/group.svg.192dpi.png");
Stylesheet = new Stylesheet(BaseRules.Concat(new[]
{
// Window title.
@@ -623,6 +626,32 @@ namespace Content.Client.Stylesheets
Element<RichTextLabel>().Class(VerbMenuElement.StyleClassVerbOtherText)
.Prop(Label.StylePropertyFont, notoSans12),
Element<TextureRect>().Class(ContextMenuElement.StyleClassContextMenuExpansionTexture)
.Prop(TextureRect.StylePropertyTexture, contextMenuExpansionTexture),
Element<TextureRect>().Class(VerbMenuElement.StyleClassVerbMenuConfirmationTexture)
.Prop(TextureRect.StylePropertyTexture, verbMenuConfirmationTexture),
// Context menu confirm buttons
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
.Prop(ContainerButton.StylePropertyStyleBox, buttonContext),
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
.Pseudo(ContainerButton.StylePseudoClassNormal)
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionDefault),
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
.Pseudo(ContainerButton.StylePseudoClassHover)
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionHovered),
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
.Pseudo(ContainerButton.StylePseudoClassPressed)
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionPressed),
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
.Pseudo(ContainerButton.StylePseudoClassDisabled)
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionDisabled),
// Thin buttons (No padding nor vertical margin)
Element<EntityContainerButton>().Class(StyleClassStorageButton)
.Prop(ContainerButton.StylePropertyStyleBox, buttonStorage),