Improve Paper UI, allow an to entity configure how it's UI looks (#13494)
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
This commit is contained in:
@@ -485,6 +485,14 @@ namespace Content.Client.Stylesheets
|
||||
};
|
||||
insetBack.SetPatchMargin(StyleBox.Margin.All, 10);
|
||||
|
||||
// Default paper background:
|
||||
var paperBackground = new StyleBoxTexture
|
||||
{
|
||||
Texture = resCache.GetTexture("/Textures/Interface/Paper/paper_background_default.svg.96dpi.png"),
|
||||
Modulate = Color.FromHex("#eaedde"), // A light cream
|
||||
};
|
||||
paperBackground.SetPatchMargin(StyleBox.Margin.All, 16.0f);
|
||||
|
||||
var contextMenuExpansionTexture = resCache.GetTexture("/Textures/Interface/VerbIcons/group.svg.192dpi.png");
|
||||
var verbMenuConfirmationTexture = resCache.GetTexture("/Textures/Interface/VerbIcons/group.svg.192dpi.png");
|
||||
|
||||
@@ -1323,6 +1331,16 @@ namespace Content.Client.Stylesheets
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#753131")),
|
||||
// ---
|
||||
|
||||
// The default look of paper in UIs. Pages can have components which override this
|
||||
Element<PanelContainer>().Class("PaperDefaultBorder")
|
||||
.Prop(PanelContainer.StylePropertyPanel, paperBackground),
|
||||
Element<RichTextLabel>().Class("PaperWrittenText")
|
||||
.Prop(Label.StylePropertyFont, notoSans12)
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#111111")),
|
||||
|
||||
Element<LineEdit>().Class("PaperLineEdit")
|
||||
.Prop(LineEdit.StylePropertyStyleBox, new StyleBoxEmpty()),
|
||||
|
||||
// Red Button ---
|
||||
Element<Button>().Class("ButtonColorRed")
|
||||
.Prop(Control.StylePropertyModulateSelf, ButtonColorDefaultRed),
|
||||
|
||||
Reference in New Issue
Block a user