Device network DeviceLists and the NetworkConfigurator (Makes air alarms usable) (#7697)
* Implement DeviceList Implement NetworkConfigurator I sould really get into the habit of making smaller commits * Remove ApcNetworkComponent from vents, scrubbers anf firelocks * Change BeforeBroadcastAttemptEvent#Recepients to readonly IReadonlySet and add a ModifiedRecepients field * Address revievs in NetworkConfigurationSystem * Fix red and green button styles * Change NetworkConfiguratorSystem#UpdateState to remove saved entites that don't exist anymore * Add AtmosDevices device net id * Add const strings for style classes Fix wrong margin for NetworkConfiguratorConfigurationMenu * Hello? Github? * Add access check before opening the configuration ui * Address reviews * Fix call to access reader * You shall not live again IgnoreComponent * Fix interaction verb check * Fix configuration window not closing when target gets deleted / out of range * Change device is already saved message to say 'network device: ... is already saves' * Apply suggestions from code review Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> * Fix applied suggestion Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
This commit is contained in:
@@ -39,6 +39,7 @@ namespace Content.Client.Stylesheets
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public sealed class StyleNano : StyleBase
|
||||
{
|
||||
public const string StyleClassBorderedWindowPanel = "BorderedWindowPanel";
|
||||
@@ -93,6 +94,9 @@ namespace Content.Client.Stylesheets
|
||||
public static readonly Color ButtonColorCautionPressed = Color.FromHex("#3e6c45");
|
||||
public static readonly Color ButtonColorCautionDisabled = Color.FromHex("#602a2a");
|
||||
|
||||
public static readonly Color ButtonColorGoodDefault = Color.FromHex("#3E6C45");
|
||||
public static readonly Color ButtonColorGoodHovered = Color.FromHex("#31843E");
|
||||
|
||||
// Context menu button colors
|
||||
public static readonly Color ButtonColorContext = Color.FromHex("#1119");
|
||||
public static readonly Color ButtonColorContextHover = Color.DarkSlateGray;
|
||||
@@ -112,6 +116,14 @@ namespace Content.Client.Stylesheets
|
||||
|
||||
public const string StyleClassItemStatus = "ItemStatus";
|
||||
|
||||
//Background
|
||||
public const string StyleClassBackgroundBaseDark = "PanelBackgroundBaseDark";
|
||||
|
||||
//Buttons
|
||||
public const string StyleClassCrossButtonRed = "CrossButtonRed";
|
||||
public const string StyleClassButtonColorRed = "ButtonColorRed";
|
||||
public const string StyleClassButtonColorGreen = "ButtonColorGreen";
|
||||
|
||||
public override Stylesheet Stylesheet { get; }
|
||||
|
||||
public StyleNano(IResourceCache resCache) : base(resCache)
|
||||
@@ -461,7 +473,7 @@ namespace Content.Client.Stylesheets
|
||||
var directionIconArrowTex = resCache.GetTexture("/Textures/Interface/VerbIcons/drop.svg.192dpi.png");
|
||||
var directionIconQuestionTex = resCache.GetTexture("/Textures/Interface/VerbIcons/information.svg.192dpi.png");
|
||||
var directionIconHereTex = resCache.GetTexture("/Textures/Interface/VerbIcons/dot.svg.192dpi.png");
|
||||
|
||||
|
||||
Stylesheet = new Stylesheet(BaseRules.Concat(new[]
|
||||
{
|
||||
// Window title.
|
||||
@@ -1294,8 +1306,47 @@ namespace Content.Client.Stylesheets
|
||||
.Prop("panel", new StyleBoxTexture(BaseButtonOpenLeft) { Padding = default })
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#1F1F23")),
|
||||
|
||||
Element<PanelContainer>().Class("Inset")
|
||||
.Prop("panel", insetBack),
|
||||
Element<PanelContainer>().Class("WindowHeadingBackgroundLight")
|
||||
.Prop("panel", new StyleBoxTexture(BaseButtonOpenLeft) { Padding = default }),
|
||||
|
||||
//The lengths you have to go through to change a background color smh
|
||||
Element<PanelContainer>().Class("PanelBackgroundBaseDark")
|
||||
.Prop("panel", new StyleBoxTexture(BaseButtonOpenBoth) { Padding = default })
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#1F1F23")),
|
||||
|
||||
// X Texture button ---
|
||||
Element<TextureButton>().Class("CrossButtonRed")
|
||||
.Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Nano/cross.svg.png"))
|
||||
.Prop(Control.StylePropertyModulateSelf, DangerousRedFore),
|
||||
|
||||
Element<TextureButton>().Class("CrossButtonRed").Pseudo(TextureButton.StylePseudoClassHover)
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#7F3636")),
|
||||
|
||||
Element<TextureButton>().Class("CrossButtonRed").Pseudo(TextureButton.StylePseudoClassHover)
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#753131")),
|
||||
// ---
|
||||
|
||||
// Red Button ---
|
||||
Element<Button>().Class("ButtonColorRed")
|
||||
.Prop(Control.StylePropertyModulateSelf, ButtonColorDefaultRed),
|
||||
|
||||
Element<Button>().Class("ButtonColorRed").Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(Control.StylePropertyModulateSelf, ButtonColorDefaultRed),
|
||||
|
||||
Element<Button>().Class("ButtonColorRed").Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(Control.StylePropertyModulateSelf, ButtonColorHoveredRed),
|
||||
// ---
|
||||
|
||||
// Green Button ---
|
||||
Element<Button>().Class("ButtonColorGreen")
|
||||
.Prop(Control.StylePropertyModulateSelf, ButtonColorGoodDefault),
|
||||
|
||||
Element<Button>().Class("ButtonColorGreen").Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(Control.StylePropertyModulateSelf, ButtonColorGoodDefault),
|
||||
|
||||
Element<Button>().Class("ButtonColorGreen").Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(Control.StylePropertyModulateSelf, ButtonColorGoodHovered),
|
||||
// ---
|
||||
|
||||
Element<Label>().Class("StatusFieldTitle")
|
||||
.Prop("font-color", NanoGold),
|
||||
|
||||
Reference in New Issue
Block a user