PDA UI refactor and cartridges (#11335)
* Work on cartridges * Work on PDA UI * Work on PDA UIs program list * Work on PDA UI borders * Add DeviceNetworkingComponent to the pda base prototype * Fix submodule version * Fix cartridge loader ui key * Fix pda menu xaml * Implement relaying ui messages * Finish implementing the notekeeper cartridge * Fix submodule version * Fix errors from merging master * Fix test failing * Implement setting preinstalled programs * Add some documentation to CartridgeLoaderSystem * Add more doc comments * Add localization to program names * Implement review suggestions * Fix background programs receiving events twice when active
This commit is contained in:
@@ -38,6 +38,7 @@ namespace Content.Client.Stylesheets
|
||||
protected StyleBoxTexture BaseButtonSquare { get; }
|
||||
|
||||
protected StyleBoxTexture BaseAngleRect { get; }
|
||||
protected StyleBoxTexture AngleBorderRect { get; }
|
||||
|
||||
protected StyleBase(IResourceCache resCache)
|
||||
{
|
||||
@@ -114,6 +115,12 @@ namespace Content.Client.Stylesheets
|
||||
};
|
||||
BaseAngleRect.SetPatchMargin(StyleBox.Margin.All, 10);
|
||||
|
||||
AngleBorderRect = new StyleBoxTexture
|
||||
{
|
||||
Texture = resCache.GetTexture("/Textures/Interface/Nano/geometric_panel_border.svg.96dpi.png"),
|
||||
};
|
||||
AngleBorderRect.SetPatchMargin(StyleBox.Margin.All, 10);
|
||||
|
||||
var vScrollBarGrabberNormal = new StyleBoxFlat
|
||||
{
|
||||
BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using System.Linq;
|
||||
using Content.Client.Actions.UI;
|
||||
using Content.Client.ContextMenu.UI;
|
||||
using Content.Client.Examine;
|
||||
using Content.Client.PDA;
|
||||
using Content.Client.Resources;
|
||||
using Content.Client.Targeting;
|
||||
using Content.Client.Targeting.UI;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Client.Verbs.UI;
|
||||
@@ -13,7 +12,6 @@ using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.Maths;
|
||||
using static Robust.Client.UserInterface.StylesheetHelpers;
|
||||
|
||||
namespace Content.Client.Stylesheets
|
||||
@@ -1395,6 +1393,60 @@ namespace Content.Client.Stylesheets
|
||||
Element<Label>().Class("Disabled")
|
||||
.Prop("font-color", DisabledFore),
|
||||
|
||||
//PDA - Backgrounds
|
||||
Element<PanelContainer>().Class("PDAContentBackground")
|
||||
.Prop(PanelContainer.StylePropertyPanel, BaseButtonOpenBoth)
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#25252a")),
|
||||
|
||||
Element<PanelContainer>().Class("PDABackground")
|
||||
.Prop(PanelContainer.StylePropertyPanel, BaseButtonOpenBoth)
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#000000")),
|
||||
|
||||
Element<PanelContainer>().Class("PDABackgroundRect")
|
||||
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#717059")),
|
||||
|
||||
Element<PanelContainer>().Class("PDABorderRect")
|
||||
.Prop(PanelContainer.StylePropertyPanel, AngleBorderRect),
|
||||
|
||||
Element<PanelContainer>().Class("BackgroundDark")
|
||||
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat(Color.FromHex("#25252A"))),
|
||||
|
||||
//PDA - Buttons
|
||||
Element<PDASettingsButton>().Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(PDASettingsButton.StylePropertyBgColor, Color.FromHex(PDASettingsButton.NormalBgColor))
|
||||
.Prop(PDASettingsButton.StylePropertyFgColor, Color.FromHex(PDASettingsButton.EnabledFgColor)),
|
||||
|
||||
Element<PDASettingsButton>().Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(PDASettingsButton.StylePropertyBgColor, Color.FromHex(PDASettingsButton.HoverColor))
|
||||
.Prop(PDASettingsButton.StylePropertyFgColor, Color.FromHex(PDASettingsButton.EnabledFgColor)),
|
||||
|
||||
Element<PDASettingsButton>().Pseudo(ContainerButton.StylePseudoClassPressed)
|
||||
.Prop(PDASettingsButton.StylePropertyBgColor, Color.FromHex(PDASettingsButton.PressedColor))
|
||||
.Prop(PDASettingsButton.StylePropertyFgColor, Color.FromHex(PDASettingsButton.EnabledFgColor)),
|
||||
|
||||
Element<PDASettingsButton>().Pseudo(ContainerButton.StylePseudoClassDisabled)
|
||||
.Prop(PDASettingsButton.StylePropertyBgColor, Color.FromHex(PDASettingsButton.NormalBgColor))
|
||||
.Prop(PDASettingsButton.StylePropertyFgColor, Color.FromHex(PDASettingsButton.DisabledFgColor)),
|
||||
|
||||
Element<PDAProgramItem>().Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(PDAProgramItem.StylePropertyBgColor, Color.FromHex(PDAProgramItem.NormalBgColor)),
|
||||
|
||||
Element<PDAProgramItem>().Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(PDAProgramItem.StylePropertyBgColor, Color.FromHex(PDAProgramItem.HoverColor)),
|
||||
|
||||
Element<PDAProgramItem>().Pseudo(ContainerButton.StylePseudoClassPressed)
|
||||
.Prop(PDAProgramItem.StylePropertyBgColor, Color.FromHex(PDAProgramItem.HoverColor)),
|
||||
|
||||
//PDA - Text
|
||||
Element<Label>().Class("PDAContentFooterText")
|
||||
.Prop(Label.StylePropertyFont, notoSans10)
|
||||
.Prop(Label.StylePropertyFontColor, Color.FromHex("#757575")),
|
||||
|
||||
Element<Label>().Class("PDAWindowFooterText")
|
||||
.Prop(Label.StylePropertyFont, notoSans10)
|
||||
.Prop(Label.StylePropertyFontColor, Color.FromHex("#333d3b")),
|
||||
|
||||
}).ToList());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user