StyleNano removal: Palette system and Sheetlets (#29903)
* Apply patch 1777eea9a4..6b32bb2b14
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* make red squiggly line go away
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Add todo list
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Add palette to `TextureButton`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Rename `PalettedButtonSheetlet` to `NTButtonSheetlet` and move useful methods to `ButtonSheetlet`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* migrate `ContextMenu` styles
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Update todo
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* tweak NT colors
* New stylesheet: `InterfaceStylesheet` & `InterfaceTooltipSheetlet`
* Move inheritance of `IButtonConfig` to `NanotransenStylesheet.Buttons`
* move `MenuButtonSheetlet` & actually implement `InterfaceStylesheet` correctly
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* tweak color & update todo
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* chat is this real (update chat palette)
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Update todo
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `SmallButton` and remove some obsolete things from `StyleNano`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* rename `StyleClasses` to `StyleClass` so `Stylesheets.Redux.StyleClasses` syntax is dead
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* replace `ButtonColorGreen` with `Positive`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `Placeholder`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Examine popup buttons
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* move over more things & cleanup `StyleNano` more (under 1000 lines!!!!)
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Remove some more redundant stuff
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Undo style change for chat window
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* paper editing works now
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `OptionButton` styles
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `ListContainer`, move `DefaultWindow` styles (for now) & more cleanup
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* fix `ActionButton` not having highlighting
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* remove imports of `Robust.Client.UserInterface.StylesheetHelpers` & format
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `ButtonBig` and more cleanup
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Move items inheriting from `ISheetletConfig` into their own directory
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Cleanup & move `Label` styles
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Action search box styles
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Moved, stuff is
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* rename `LabelSubtext` to `LabelSubText` & move more stuff (were almost there!!)
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* yap & move over MORE stuff (just like one thing left!!!)
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Change status classes to appropriate existing classes
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* remove remaining references to `StyleNano`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Fix some hardcoding & broken code, `GetFromControl`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Scrollbars!
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* chores
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* clean up `StyleClass.cs`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `ItemListSheetlet` refactor
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* more chores!
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Consistency w/ directory structure
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Move `MainMenuSheetlet`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `ColorPalette`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* whoopsie
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Remove most sheet-specific sheetlets
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* fix warnings, cleanup, & fix scrollbar (this is why we fix warnings boys)
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* yap
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* MASSIVE resharper skill issue
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* actually use `ISheetletConfig`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* have specific sheetlet be specific
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `GetResourceOr`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* cleanup & move / remove `IPalette`s
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* actually do specific stylesheets correctly & fix tooltips
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* cleanup & logging
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Move `FontKind` and `FontKindExtensions` to their own files
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* rename `InterfaceStylesheet` to `SystemStylesheet`
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* change `ButtonHovered` etc to `PseudoHovered` etc
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* give the palettes fun names
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `StyleSpace` is no more
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* It should compile now! I am now going to bed (fr) if it fails it fails
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* make squiggly red line go away
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* add additional type restrictions to sheetlets
* `CommonStylesheet`
* minor cleanup
* Make `GetSheetletRules` not horrible
* wait this was duplicating style rules. oops!
* move some sheetlets to their associated xamls
* oh wait apparently that was important
* review pass 1
* review pass 2 (font & color stuff)
* review pass 3: remove unused stuff / filename fix
* fix warnings & "replace cast with explicit variable type"
* move `Palette` stuff to its own directory
* tweak colors (they're different now that I actually fixed the OKlab thing)
* review pass 4: little things
* make window close button grey before hovering
* refactor `HLine` to make it less terrible and allow it to be styled
* fix `NanoHeading` (it's been broken for a while whoops) and cleanup hardcoding
* band-aid missing references in `StyleNano`
* move `StyleBox` generating functions out of `IButtonSheetlet` into `StyleBoxHelper`
* remove dictionary field from `IStylesheetManager`
* Add check for unloaded sheetlets
* style tweaks to satisfy OCD
* I somehow missed this: `Caution` styleclass replaced with `negative`, refactor `PowerChargeWindow`
* tweak palettes for like the fourth time
* construct `StyleNano` / `StyleSpace` in `StylesheetManager` and mark them as obsolete
* rename `BackgroundPanel` classes for consistency
* tweak window / `ListContainer`
* oh right you use `///` not `/**`
* font system is bad, make it temporary
* acknowledge Divider funkyness
* remove use of class `Disabled`
* `ColorPalette` allow overriding colors with brace initialization
* review pass again
* tweak disabled button colors
* `StatusPalette` tweaks
* typo
* Make squiggly red line go away
* Delete `Redux`
* Remove all references to `Redux`
* make red less radioactive
* Store stylesheet name inside stylesheet class
* fix merge errors
* use RT's Oklab support instead
* shuffle around `StylesheetManager` fields
* apply stylesheets based off `StylesheetComponent`
* simplify `ColorPalette` construction
* add todo for `SheetletConfigType`
* `OptionButton` has a background color now
* fix disabled buttons
* sigh (red color palette fixed)
* make `ItemList` use primary palette
* Revert "apply stylesheets based off `StylesheetComponent`"
This reverts commit c05b147da845f6e04ff33d1cbd91a18a92c676d7.
* dead code removal
* buttons are green when pressed (we need togglebuttons)
---------
Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.Prototypes;
|
||||
using System.Numerics;
|
||||
using System.Linq;
|
||||
using Content.Client.Stylesheets;
|
||||
|
||||
namespace Content.Client.Access.UI
|
||||
{
|
||||
@@ -49,12 +50,12 @@ namespace Content.Client.Access.UI
|
||||
icons.Sort((x, y) => string.Compare(x.LocalizedJobName, y.LocalizedJobName, StringComparison.CurrentCulture));
|
||||
foreach (var jobIcon in icons)
|
||||
{
|
||||
String styleBase = StyleBase.ButtonOpenBoth;
|
||||
String styleBase = StyleClass.ButtonOpenBoth;
|
||||
var modulo = i % JobIconColumnCount;
|
||||
if (modulo == 0)
|
||||
styleBase = StyleBase.ButtonOpenRight;
|
||||
styleBase = StyleClass.ButtonOpenRight;
|
||||
else if (modulo == JobIconColumnCount - 1)
|
||||
styleBase = StyleBase.ButtonOpenLeft;
|
||||
styleBase = StyleClass.ButtonOpenLeft;
|
||||
|
||||
// Generate buttons
|
||||
var jobIconButton = new Button
|
||||
|
||||
@@ -119,11 +119,11 @@ public sealed partial class GroupedAccessLevelChecklist : BoxContainer
|
||||
if (_groupedAccessLevels.Count > 1)
|
||||
{
|
||||
if (AccessGroupList.ChildCount == 0)
|
||||
accessGroupButton.AddStyleClass(StyleBase.ButtonOpenLeft);
|
||||
accessGroupButton.AddStyleClass(StyleClass.ButtonOpenLeft);
|
||||
else if (_groupedAccessLevels.Count > 1 && AccessGroupList.ChildCount == (_groupedAccessLevels.Count - 1))
|
||||
accessGroupButton.AddStyleClass(StyleBase.ButtonOpenRight);
|
||||
accessGroupButton.AddStyleClass(StyleClass.ButtonOpenRight);
|
||||
else
|
||||
accessGroupButton.AddStyleClass(StyleBase.ButtonOpenBoth);
|
||||
accessGroupButton.AddStyleClass(StyleClass.ButtonOpenBoth);
|
||||
}
|
||||
|
||||
accessGroupButton.Pressed = _accessGroupTabIndex == orderedAccessGroups.IndexOf(accessGroup);
|
||||
|
||||
@@ -23,9 +23,10 @@ namespace Content.Client.Actions.UI
|
||||
|
||||
public ActionAlertTooltip(FormattedMessage name, FormattedMessage? desc, string? requires = null)
|
||||
{
|
||||
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSystem;
|
||||
_gameTiming = IoCManager.Resolve<IGameTiming>();
|
||||
|
||||
SetOnlyStyleClass(StyleNano.StyleClassTooltipPanel);
|
||||
SetOnlyStyleClass(StyleClass.TooltipPanel);
|
||||
|
||||
BoxContainer vbox;
|
||||
AddChild(vbox = new BoxContainer
|
||||
@@ -36,7 +37,7 @@ namespace Content.Client.Actions.UI
|
||||
var nameLabel = new RichTextLabel
|
||||
{
|
||||
MaxWidth = TooltipTextMaxWidth,
|
||||
StyleClasses = {StyleNano.StyleClassTooltipActionTitle}
|
||||
StyleClasses = { StyleClass.TooltipTitle }
|
||||
};
|
||||
nameLabel.SetMessage(name);
|
||||
vbox.AddChild(nameLabel);
|
||||
@@ -46,7 +47,7 @@ namespace Content.Client.Actions.UI
|
||||
var description = new RichTextLabel
|
||||
{
|
||||
MaxWidth = TooltipTextMaxWidth,
|
||||
StyleClasses = {StyleNano.StyleClassTooltipActionDescription}
|
||||
StyleClasses = { StyleClass.TooltipDesc }
|
||||
};
|
||||
description.SetMessage(desc);
|
||||
vbox.AddChild(description);
|
||||
@@ -55,7 +56,7 @@ namespace Content.Client.Actions.UI
|
||||
vbox.AddChild(_cooldownLabel = new RichTextLabel
|
||||
{
|
||||
MaxWidth = TooltipTextMaxWidth,
|
||||
StyleClasses = {StyleNano.StyleClassTooltipActionCooldown},
|
||||
StyleClasses = { StyleClass.TooltipDesc },
|
||||
Visible = false
|
||||
});
|
||||
|
||||
@@ -64,7 +65,7 @@ namespace Content.Client.Actions.UI
|
||||
var requiresLabel = new RichTextLabel
|
||||
{
|
||||
MaxWidth = TooltipTextMaxWidth,
|
||||
StyleClasses = {StyleNano.StyleClassTooltipActionRequirements}
|
||||
StyleClasses = { StyleClass.TooltipDesc }
|
||||
};
|
||||
|
||||
if (!FormattedMessage.TryFromMarkup("[color=#635c5c]" + requires + "[/color]", out var markup))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PanelContainer.PanelOverride>
|
||||
|
||||
<Control HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="600">
|
||||
<PanelContainer StyleClasses="AngleRect" />
|
||||
<PanelContainer StyleClasses="BackgroundPanel" />
|
||||
|
||||
<BoxContainer Orientation="Vertical" Margin="4">
|
||||
<RichTextLabel Name="Description" />
|
||||
|
||||
@@ -12,17 +12,19 @@ namespace Content.Client.Administration.UI.AdminRemarks;
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class AdminMessagePopupWindow : Control
|
||||
{
|
||||
[Dependency] private readonly IStylesheetManager _styleMan = default!;
|
||||
|
||||
private float _timer = float.MaxValue;
|
||||
|
||||
public event Action? OnDismissPressed;
|
||||
|
||||
public event Action? OnAcceptPressed;
|
||||
|
||||
public AdminMessagePopupWindow()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
|
||||
Stylesheet = _styleMan.SheetSystem;
|
||||
|
||||
AcceptButton.OnPressed += OnAcceptButtonPressed;
|
||||
DismissButton.OnPressed += OnDismissButtonPressed;
|
||||
@@ -49,7 +51,8 @@ public sealed partial class AdminMessagePopupWindow : Control
|
||||
MessageContainer.AddChild(new AdminMessagePopupMessage(message));
|
||||
}
|
||||
|
||||
Description.SetMessage(FormattedMessage.FromMarkupOrThrow(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length))));
|
||||
Description.SetMessage(
|
||||
FormattedMessage.FromMarkup(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length))));
|
||||
}
|
||||
|
||||
private void OnDismissButtonPressed(BaseButton.ButtonEventArgs obj)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Content.Client.Administration.UI
|
||||
[Dependency] private readonly IClientAdminManager _adminManager = default!;
|
||||
|
||||
private readonly Menu _menu;
|
||||
private readonly List<DefaultWindow> _subWindows = new();
|
||||
private readonly List<BaseWindow> _subWindows = new();
|
||||
|
||||
private Dictionary<int, PermissionsEuiState.AdminRankData> _ranks =
|
||||
new();
|
||||
@@ -216,7 +216,7 @@ namespace Content.Client.Administration.UI
|
||||
var titleControl = new Label { Text = admin.Title ?? Loc.GetString("permissions-eui-edit-admin-title-control-text").ToLowerInvariant() };
|
||||
if (admin.Title == null) // none
|
||||
{
|
||||
titleControl.StyleClasses.Add(StyleBase.StyleClassItalic);
|
||||
titleControl.StyleClasses.Add(StyleClass.Italic);
|
||||
}
|
||||
|
||||
al.AddChild(titleControl);
|
||||
@@ -240,7 +240,7 @@ namespace Content.Client.Administration.UI
|
||||
var rankControl = new Label { Text = rank };
|
||||
if (italic)
|
||||
{
|
||||
rankControl.StyleClasses.Add(StyleBase.StyleClassItalic);
|
||||
rankControl.StyleClasses.Add(StyleClass.Italic);
|
||||
}
|
||||
|
||||
al.AddChild(rankControl);
|
||||
@@ -340,10 +340,9 @@ namespace Content.Client.Administration.UI
|
||||
tab.AddChild(adminVBox);
|
||||
tab.AddChild(rankVBox);
|
||||
|
||||
Contents.AddChild(tab);
|
||||
ContentsContainer.AddChild(tab);
|
||||
ContentsContainer.MinSize = new(600, 400);
|
||||
}
|
||||
|
||||
protected override Vector2 ContentsMinimumSize => new Vector2(600, 400);
|
||||
}
|
||||
|
||||
private sealed class EditAdminWindow : DefaultWindow
|
||||
@@ -419,21 +418,21 @@ namespace Content.Client.Administration.UI
|
||||
var inherit = new Button
|
||||
{
|
||||
Text = "I",
|
||||
StyleClasses = { StyleBase.ButtonOpenRight },
|
||||
StyleClasses = { StyleClass.ButtonOpenRight },
|
||||
Disabled = disable,
|
||||
Group = group,
|
||||
};
|
||||
var sub = new Button
|
||||
{
|
||||
Text = "-",
|
||||
StyleClasses = { StyleBase.ButtonOpenBoth },
|
||||
StyleClasses = { StyleClass.ButtonOpenBoth },
|
||||
Disabled = disable,
|
||||
Group = group
|
||||
};
|
||||
var plus = new Button
|
||||
{
|
||||
Text = "+",
|
||||
StyleClasses = { StyleBase.ButtonOpenLeft },
|
||||
StyleClasses = { StyleClass.ButtonOpenLeft },
|
||||
Disabled = disable,
|
||||
Group = group
|
||||
};
|
||||
@@ -479,7 +478,7 @@ namespace Content.Client.Administration.UI
|
||||
|
||||
bottomButtons.AddChild(SaveButton);
|
||||
|
||||
Contents.AddChild(new BoxContainer
|
||||
ContentsContainer.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Children =
|
||||
@@ -605,7 +604,7 @@ namespace Content.Client.Administration.UI
|
||||
|
||||
bottomButtons.AddChild(SaveButton);
|
||||
|
||||
Contents.AddChild(new BoxContainer
|
||||
ContentsContainer.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Children =
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
VerticalExpand="True"
|
||||
Margin="0 0 0 0"
|
||||
VerticalAlignment="Center">
|
||||
<Label Text="{Loc 'anomaly-generator-fuel-display'}" StyleClasses="StatusFieldTitle" />
|
||||
<Label Text="{Loc 'anomaly-generator-fuel-display'}" StyleClasses="highlight" />
|
||||
<ProgressBar Name="FuelBar"
|
||||
HorizontalExpand="True"
|
||||
MaxValue="1"
|
||||
@@ -27,8 +27,8 @@
|
||||
Text="0 %" />
|
||||
</ProgressBar>
|
||||
</BoxContainer>
|
||||
<RichTextLabel Name="CooldownLabel" StyleClasses="StatusFieldTitle" />
|
||||
<RichTextLabel Name="ReadyLabel" StyleClasses="StatusFieldTitle" />
|
||||
<RichTextLabel Name="CooldownLabel" StyleClasses="highlight" />
|
||||
<RichTextLabel Name="ReadyLabel" StyleClasses="highlight" />
|
||||
</BoxContainer>
|
||||
<!--Sprite View-->
|
||||
<PanelContainer Margin="12 0 0 0"
|
||||
|
||||
@@ -338,7 +338,7 @@ namespace Content.Client.Arcade
|
||||
menuInnerPanel.AddChild(menuContainer);
|
||||
#endregion
|
||||
|
||||
Contents.AddChild(_mainPanel);
|
||||
ContentsContainer.AddChild(_mainPanel);
|
||||
|
||||
CanKeyboardFocus = true;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Content.Client.Arcade
|
||||
newGame.OnPressed += _ => OnPlayerAction?.Invoke(SharedSpaceVillainArcadeComponent.PlayerAction.NewGame);
|
||||
grid.AddChild(newGame);
|
||||
|
||||
Contents.AddChild(grid);
|
||||
ContentsContainer.AddChild(grid);
|
||||
}
|
||||
|
||||
private void UpdateMetadata(SharedSpaceVillainArcadeComponent.SpaceVillainArcadeMetaDataUpdateMessage message)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Content.Client.Atmos.Monitor.UI.Widgets;
|
||||
using Content.Client.Message;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Client.Stylesheets.Palette;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Atmos.Monitor;
|
||||
@@ -131,7 +131,7 @@ public sealed partial class AirAlarmWindow : FancyWindow
|
||||
case GasVentPumpData pump:
|
||||
if (!_pumps.TryGetValue(addr, out var pumpControl))
|
||||
{
|
||||
var control= new PumpControl(pump, addr);
|
||||
var control = new PumpControl(pump, addr);
|
||||
control.PumpDataChanged += AtmosDeviceDataChanged;
|
||||
control.PumpDataCopied += AtmosDeviceDataCopied;
|
||||
_pumps.Add(addr, control);
|
||||
@@ -186,11 +186,9 @@ public sealed partial class AirAlarmWindow : FancyWindow
|
||||
{
|
||||
return curAlarm switch
|
||||
{
|
||||
AtmosAlarmType.Danger => StyleNano.DangerousRedFore,
|
||||
AtmosAlarmType.Warning => StyleNano.ConcerningOrangeFore,
|
||||
_ => StyleNano.GoodGreenFore,
|
||||
AtmosAlarmType.Danger => Palettes.Status.Critical,
|
||||
AtmosAlarmType.Warning => Palettes.Status.Warning,
|
||||
_ => Palettes.Status.Good,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Shared.Atmos.Monitor;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
@@ -42,11 +43,11 @@ public sealed partial class ThresholdBoundControl : BoxContainer
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
CBoundLabel.RemoveStyleClass("Disabled");
|
||||
CBoundLabel.RemoveStyleClass(StyleClass.LabelWeak);
|
||||
}
|
||||
else
|
||||
{
|
||||
CBoundLabel.SetOnlyStyleClass("Disabled");
|
||||
CBoundLabel.SetOnlyStyleClass(StyleClass.LabelWeak);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
MinSize="480 400" Title="Canister">
|
||||
<BoxContainer Orientation="Vertical" Margin="5 5 5 5" SeparationOverride="10">
|
||||
<BoxContainer Orientation="Vertical" VerticalExpand="True">
|
||||
<Label Text="{Loc comp-gas-canister-ui-canister-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/>
|
||||
<Label Text="{Loc comp-gas-canister-ui-canister-status}" StyleClasses="LabelHeading"/>
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc comp-gas-canister-ui-canister-pressure}"/>
|
||||
<Label Name="CanisterPressureLabel" Align="Center" HorizontalExpand="True"/>
|
||||
@@ -16,7 +16,7 @@
|
||||
</BoxContainer>
|
||||
|
||||
<BoxContainer Orientation="Vertical" VerticalExpand="True">
|
||||
<Label Text="{Loc comp-gas-canister-ui-holding-tank-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/>
|
||||
<Label Text="{Loc comp-gas-canister-ui-holding-tank-status}" StyleClasses="LabelHeading"/>
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc comp-gas-canister-ui-holding-tank-label}"/>
|
||||
<Label Name="TankLabelLabel" Text="{Loc comp-gas-canister-ui-holding-tank-label-empty}" Align="Center" HorizontalExpand="True"/>
|
||||
@@ -29,7 +29,7 @@
|
||||
</BoxContainer>
|
||||
|
||||
<BoxContainer Orientation="Vertical" VerticalExpand="True">
|
||||
<Label Text="{Loc comp-gas-canister-ui-release-valve-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/>
|
||||
<Label Text="{Loc comp-gas-canister-ui-release-valve-status}" StyleClasses="LabelHeading"/>
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<BoxContainer Orientation="Vertical">
|
||||
<Label Text="{Loc comp-gas-canister-ui-release-pressure}"/>
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
Orientation="Vertical"
|
||||
HorizontalExpand="True"
|
||||
Margin="0 0 0 5">
|
||||
<PanelContainer>
|
||||
<PanelContainer.PanelOverride>
|
||||
<graphics:StyleBoxFlat BackgroundColor="{xNamespace:Static style:StyleNano.ButtonColorDisabled}" />
|
||||
</PanelContainer.PanelOverride>
|
||||
<PanelContainer StyleClasses="PanelDark">
|
||||
<Collapsible Name="Collapsible">
|
||||
<CollapsibleHeading Name="Heading" MinHeight="35"/>
|
||||
<CollapsibleBody Name="Body">
|
||||
|
||||
@@ -14,10 +14,8 @@
|
||||
<PanelContainer
|
||||
VerticalExpand="True"
|
||||
HorizontalExpand="True"
|
||||
Margin="15">
|
||||
<PanelContainer.PanelOverride>
|
||||
<graphics:StyleBoxFlat BackgroundColor="{xNamespace:Static style:StyleNano.PanelDark}" />
|
||||
</PanelContainer.PanelOverride>
|
||||
Margin="15"
|
||||
StyleClasses="PanelDark">
|
||||
<ScrollContainer VerticalExpand="True" HorizontalExpand="True">
|
||||
<Control>
|
||||
<Label Text="{Loc 'cryostorage-ui-label-no-bodies'}" Name="EmptyLabel" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<DefaultWindow
|
||||
xmlns="https://spacestation14.io"
|
||||
Title="{Loc 'ui-bql-results-title'}">
|
||||
<BoxContainer Orientation="Vertical">
|
||||
<BoxContainer Orientation="Vertical" MinSize="500 700">
|
||||
<Label Name="StatusLabel" />
|
||||
<ScrollContainer VerticalExpand="True">
|
||||
<BoxContainer Orientation="Vertical" Name="ItemList" VerticalExpand="True" />
|
||||
|
||||
@@ -21,8 +21,6 @@ internal sealed partial class ToolshedVisualizeWindow : DefaultWindow
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
protected override Vector2 ContentsMinimumSize => new(500, 700);
|
||||
|
||||
public void Update((string name, NetEntity entity)[] entities)
|
||||
{
|
||||
StatusLabel.Text = _loc.GetString("ui-bql-results-status", ("count", entities.Length));
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Margin="10 10 10 0"
|
||||
HorizontalExpand="True"
|
||||
Visible="True">
|
||||
<PanelContainer StyleClasses="AngleRect" HorizontalExpand="True">
|
||||
<PanelContainer StyleClasses="BackgroundPanel" HorizontalExpand="True">
|
||||
<BoxContainer Orientation="Vertical"
|
||||
HorizontalExpand="True">
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
|
||||
@@ -36,12 +36,12 @@ namespace Content.Client.Changelog
|
||||
if (_changelogManager.NewChangelogEntries)
|
||||
{
|
||||
Text = Loc.GetString("changelog-button-new-entries");
|
||||
StyleClasses.Add(StyleBase.ButtonCaution);
|
||||
StyleClasses.Add(StyleClass.Negative);
|
||||
}
|
||||
else
|
||||
{
|
||||
Text = Loc.GetString("changelog-button");
|
||||
StyleClasses.Remove(StyleBase.ButtonCaution);
|
||||
StyleClasses.Remove(StyleClass.Negative);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public sealed partial class ChangelogTab : Control
|
||||
ChangelogBody.AddChild(new Label
|
||||
{
|
||||
Text = dayNice,
|
||||
StyleClasses = { StyleBase.StyleClassLabelHeading },
|
||||
StyleClasses = { StyleClass.LabelHeading },
|
||||
Margin = new Thickness(4, 6, 0, 0)
|
||||
});
|
||||
|
||||
@@ -117,7 +117,7 @@ public sealed partial class ChangelogTab : Control
|
||||
};
|
||||
|
||||
readDivider.AddChild(hBox);
|
||||
readDivider.AddChild(new PanelContainer { StyleClasses = { StyleBase.ClassLowDivider } });
|
||||
readDivider.AddChild(new PanelContainer { StyleClasses = { StyleClass.LowDivider } });
|
||||
ChangelogBody.AddChild(readDivider);
|
||||
|
||||
if (first)
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
xmlns:ui="clr-namespace:Content.Client.Changelog"
|
||||
Title="{Loc 'changelog-window-title'}"
|
||||
MinSize="500 400"
|
||||
SetSize="500 400">
|
||||
<PanelContainer StyleClasses="AngleRect" />
|
||||
SetSize="500 400"
|
||||
Stylesheet="Interface">
|
||||
<PanelContainer StyleClasses="BackgroundPanel" />
|
||||
<BoxContainer Orientation="Vertical">
|
||||
<TabContainer Name="Tabs" Access="Public" HorizontalExpand="True" VerticalExpand="True" />
|
||||
<PanelContainer StyleClasses="LowDivider" />
|
||||
|
||||
@@ -21,8 +21,7 @@ namespace Content.Client.Changelog
|
||||
public ChangelogWindow()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
WindowTitle.AddStyleClass(StyleBase.StyleClassLabelHeading);
|
||||
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
|
||||
WindowTitle.AddStyleClass(StyleClass.LabelHeading);
|
||||
}
|
||||
|
||||
protected override void Opened()
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<Label Text="{Loc 'chem-master-window-packaging-text'}" />
|
||||
<Control HorizontalExpand="True"/>
|
||||
<Label Text="{Loc 'chem-master-window-buffer-label'}" />
|
||||
<Label Name="BufferCurrentVolume" StyleClasses="LabelSecondaryColor" />
|
||||
<Label Name="BufferCurrentVolume" StyleClasses="LabelWeak" />
|
||||
</BoxContainer>
|
||||
|
||||
<!-- Wrap the packaging info-->
|
||||
@@ -112,9 +112,9 @@
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc 'chem-master-window-pills-label'}" />
|
||||
<Control HorizontalExpand="True" MinSize="50 0" />
|
||||
<Label Text="{Loc 'chem-master-window-pills-number-label'}" Margin="5 0 0 0" StyleClasses="LabelSecondaryColor" />
|
||||
<Label Text="{Loc 'chem-master-window-pills-number-label'}" Margin="5 0 0 0" StyleClasses="LabelWeak" />
|
||||
<SpinBox MinSize="100 0" Name="PillNumber" Access="Public" Value="0" />
|
||||
<Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelSecondaryColor" />
|
||||
<Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelWeak" />
|
||||
<SpinBox MinSize="100 0" Name="PillDosage" Access="Public" Value="1" />
|
||||
<Button MinSize="80 0" Name="CreatePillButton" Access="Public" Text="{Loc 'chem-master-window-create-button'}" />
|
||||
</BoxContainer>
|
||||
@@ -122,7 +122,7 @@
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Text="{Loc 'chem-master-window-bottles-label'}" />
|
||||
<Control HorizontalExpand="True" MinSize="50 0" />
|
||||
<Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelSecondaryColor" />
|
||||
<Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelWeak" />
|
||||
<SpinBox MinSize="100 0" Name="BottleDosage" Access="Public" Value="0" />
|
||||
<Button MinSize="80 0" Name="CreateBottleButton" Access="Public" Text="{Loc 'chem-master-window-create-button'}" />
|
||||
</BoxContainer>
|
||||
|
||||
@@ -53,14 +53,14 @@ namespace Content.Client.Chemistry.UI
|
||||
{
|
||||
// For every button decide which stylebase to have
|
||||
// Every row has 10 buttons
|
||||
String styleBase = StyleBase.ButtonOpenBoth;
|
||||
String styleBase = StyleClass.ButtonOpenBoth;
|
||||
uint modulo = i % 10;
|
||||
if (i > 0 && modulo == 0)
|
||||
styleBase = StyleBase.ButtonOpenRight;
|
||||
styleBase = StyleClass.ButtonOpenRight;
|
||||
else if (i > 0 && modulo == 9)
|
||||
styleBase = StyleBase.ButtonOpenLeft;
|
||||
styleBase = StyleClass.ButtonOpenLeft;
|
||||
else if (i == 0)
|
||||
styleBase = StyleBase.ButtonOpenRight;
|
||||
styleBase = StyleClass.ButtonOpenRight;
|
||||
|
||||
// Generate buttons
|
||||
PillTypeButtons[i] = new Button
|
||||
@@ -113,16 +113,16 @@ namespace Content.Client.Chemistry.UI
|
||||
|
||||
var buttonConfigs = new (string text, ChemMasterReagentAmount amount, string styleClass)[]
|
||||
{
|
||||
("1", ChemMasterReagentAmount.U1, StyleBase.ButtonOpenBoth),
|
||||
("5", ChemMasterReagentAmount.U5, StyleBase.ButtonOpenBoth),
|
||||
("10", ChemMasterReagentAmount.U10, StyleBase.ButtonOpenBoth),
|
||||
("15", ChemMasterReagentAmount.U15, StyleBase.ButtonOpenBoth),
|
||||
("20", ChemMasterReagentAmount.U20, StyleBase.ButtonOpenBoth),
|
||||
("25", ChemMasterReagentAmount.U25, StyleBase.ButtonOpenBoth),
|
||||
("30", ChemMasterReagentAmount.U30, StyleBase.ButtonOpenBoth),
|
||||
("50", ChemMasterReagentAmount.U50, StyleBase.ButtonOpenBoth),
|
||||
("100", ChemMasterReagentAmount.U100, StyleBase.ButtonOpenBoth),
|
||||
(Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleBase.ButtonOpenLeft),
|
||||
("1", ChemMasterReagentAmount.U1, StyleClass.ButtonOpenBoth),
|
||||
("5", ChemMasterReagentAmount.U5, StyleClass.ButtonOpenBoth),
|
||||
("10", ChemMasterReagentAmount.U10, StyleClass.ButtonOpenBoth),
|
||||
("15", ChemMasterReagentAmount.U15, StyleClass.ButtonOpenBoth),
|
||||
("20", ChemMasterReagentAmount.U20, StyleClass.ButtonOpenBoth),
|
||||
("25", ChemMasterReagentAmount.U25, StyleClass.ButtonOpenBoth),
|
||||
("30", ChemMasterReagentAmount.U30, StyleClass.ButtonOpenBoth),
|
||||
("50", ChemMasterReagentAmount.U50, StyleClass.ButtonOpenBoth),
|
||||
("100", ChemMasterReagentAmount.U100, StyleClass.ButtonOpenBoth),
|
||||
(Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleClass.ButtonOpenLeft),
|
||||
};
|
||||
|
||||
var buttons = new List<ReagentButton>();
|
||||
@@ -252,7 +252,7 @@ namespace Content.Client.Chemistry.UI
|
||||
var bufferVol = new Label
|
||||
{
|
||||
Text = $"{state.BufferCurrentVolume}u",
|
||||
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
|
||||
StyleClasses = { StyleClass.LabelWeak }
|
||||
};
|
||||
bufferHBox.AddChild(bufferVol);
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace Content.Client.Chemistry.UI
|
||||
new Label
|
||||
{
|
||||
Text = $"{info.CurrentVolume}/{info.MaxVolume}",
|
||||
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
|
||||
StyleClasses = { StyleClass.LabelWeak }
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -376,7 +376,7 @@ namespace Content.Client.Chemistry.UI
|
||||
new Label
|
||||
{
|
||||
Text = $"{quantity}u",
|
||||
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
|
||||
StyleClasses = { StyleClass.LabelWeak }
|
||||
},
|
||||
|
||||
// Padding
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed class HyposprayStatusControl : Control
|
||||
{
|
||||
_parent = parent;
|
||||
_solutionContainers = solutionContainers;
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
AddChild(_label);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public sealed class InjectorStatusControl : Control
|
||||
{
|
||||
_parent = parent;
|
||||
_solutionContainers = solutionContainers;
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
AddChild(_label);
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Content.Client.Chemistry.UI
|
||||
var quantityLabel = new Label
|
||||
{
|
||||
Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", quantity)),
|
||||
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor },
|
||||
StyleClasses = { StyleClass.LabelWeak },
|
||||
};
|
||||
|
||||
ContainerInfo.Children.Add(new BoxContainer
|
||||
|
||||
@@ -29,7 +29,7 @@ public sealed class SolutionStatusControl : PollingItemStatusControl<SolutionSta
|
||||
_parent = parent;
|
||||
_entityManager = entityManager;
|
||||
_solutionContainers = solutionContainers;
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
AddChild(_label);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Content.Client.Cloning.UI
|
||||
|
||||
Title = Loc.GetString("accept-cloning-window-title");
|
||||
|
||||
Contents.AddChild(new BoxContainer
|
||||
ContentsContainer.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Children =
|
||||
|
||||
@@ -67,7 +67,7 @@ public sealed partial class ChameleonMenu : DefaultWindow
|
||||
MinSize = new Vector2(48, 48),
|
||||
HorizontalExpand = true,
|
||||
Group = group,
|
||||
StyleClasses = {StyleBase.ButtonSquare},
|
||||
StyleClasses = {StyleClass.ButtonSquare},
|
||||
ToggleMode = true,
|
||||
Pressed = _selectedId == id,
|
||||
ToolTip = proto.Name
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Content.Client.Configurable.UI
|
||||
outerColumn.AddChild(Column);
|
||||
baseContainer.AddChild(outerColumn);
|
||||
baseContainer.AddChild(confirmButton);
|
||||
Contents.AddChild(baseContainer);
|
||||
ContentsContainer.AddChild(baseContainer);
|
||||
}
|
||||
|
||||
private void OnConfirm(ButtonEventArgs args)
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
Name="IconLabel"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
StyleClasses="contextMenuIconLabel"
|
||||
StyleClasses="LabelSubText"
|
||||
Align="Right"
|
||||
Visible="false"/>
|
||||
</SpriteView>
|
||||
<RichTextLabel
|
||||
|
||||
@@ -16,7 +16,6 @@ namespace Content.Client.ContextMenu.UI
|
||||
{
|
||||
public const string StyleClassContextMenuButton = "contextMenuButton";
|
||||
public const string StyleClassContextMenuExpansionTexture = "contextMenuExpansionTexture";
|
||||
public const string StyleClassEntityMenuIconLabel = "contextMenuIconLabel";
|
||||
|
||||
public const float ElementMargin = 2;
|
||||
public const float ElementHeight = 32;
|
||||
|
||||
@@ -34,7 +34,7 @@ public sealed class CrayonSystem : SharedCrayonSystem
|
||||
_crayon = crayon;
|
||||
_charges = charges;
|
||||
_capacity = entityManage.GetComponent<LimitedChargesComponent>(_crayon.Owner).MaxCharges;
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
AddChild(_label);
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,8 @@ namespace Content.Client.Crayon.UI
|
||||
|
||||
private void ButtonOnPressed(ButtonEventArgs obj)
|
||||
{
|
||||
if (obj.Button.Name == null) return;
|
||||
if (obj.Button.Name == null)
|
||||
return;
|
||||
|
||||
_selected = obj.Button.Name;
|
||||
_autoSelected = null;
|
||||
|
||||
@@ -258,7 +258,7 @@ public sealed partial class CreditsWindow : DefaultWindow
|
||||
foreach (var entry in CreditsManager.GetLicenses(_resourceManager).OrderBy(p => p.Name))
|
||||
{
|
||||
licensesContainer.AddChild(new Label
|
||||
{ StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = entry.Name });
|
||||
{ StyleClasses = { StyleClass.LabelHeading }, Text = entry.Name });
|
||||
|
||||
// We split these line by line because otherwise
|
||||
// the LGPL causes Clyde to go out of bounds in the rendering code.
|
||||
@@ -299,7 +299,7 @@ public sealed partial class CreditsWindow : DefaultWindow
|
||||
|
||||
first = false;
|
||||
patronsContainer.AddChild(new Label
|
||||
{ StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = $"{tier.Key}" });
|
||||
{ StyleClasses = { StyleClass.LabelHeading }, Text = $"{tier.Key}" });
|
||||
|
||||
var msg = string.Join(", ", tier.OrderBy(p => p.Name).Select(p => p.Name));
|
||||
|
||||
@@ -347,7 +347,7 @@ public sealed partial class CreditsWindow : DefaultWindow
|
||||
|
||||
first = false;
|
||||
ss14ContributorsContainer.AddChild(new Label
|
||||
{ StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = title });
|
||||
{ StyleClasses = { StyleClass.LabelHeading }, Text = title });
|
||||
|
||||
var label = new RichTextLabel();
|
||||
var text = _resourceManager.ContentFileReadAllText($"/Credits/{path}");
|
||||
|
||||
@@ -157,15 +157,12 @@ public sealed partial class DecalPlacerWindow : DefaultWindow
|
||||
{
|
||||
var panelContainer = new PanelContainer
|
||||
{
|
||||
PanelOverride = new StyleBoxFlat
|
||||
{
|
||||
BackgroundColor = StyleNano.ButtonColorDefault
|
||||
},
|
||||
Children =
|
||||
{
|
||||
button
|
||||
}
|
||||
};
|
||||
panelContainer.SetOnlyStyleClass(StyleClass.PanelLight);
|
||||
Grid.AddChild(panelContainer);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -21,7 +21,7 @@ public sealed class HandheldGpsStatusControl : Control
|
||||
_parent = parent;
|
||||
_entMan = IoCManager.Resolve<IEntityManager>();
|
||||
_transform = _entMan.System<TransformSystem>();
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
AddChild(_label);
|
||||
UpdateGpsDetails();
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public sealed partial class GatewayWindow : FancyWindow,
|
||||
|
||||
if (Pressable())
|
||||
{
|
||||
openButton.AddStyleClass(StyleBase.ButtonCaution);
|
||||
openButton.AddStyleClass(StyleClass.Negative);
|
||||
}
|
||||
|
||||
var buttonContainer = new BoxContainer()
|
||||
|
||||
@@ -15,7 +15,7 @@ public sealed class ReturnToBodyMenu : DefaultWindow
|
||||
{
|
||||
Title = Loc.GetString("ghost-return-to-body-title");
|
||||
|
||||
Contents.AddChild(new BoxContainer
|
||||
ContentsContainer.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Children =
|
||||
|
||||
@@ -116,7 +116,7 @@ public sealed partial class ChameleonControllerMenu : FancyWindow
|
||||
var button = new Button
|
||||
{
|
||||
HorizontalExpand = true,
|
||||
StyleClasses = {StyleBase.ButtonSquare},
|
||||
StyleClasses = {StyleClass.ButtonSquare},
|
||||
ToolTip = Loc.GetString(name),
|
||||
Text = Loc.GetString(name),
|
||||
Margin = new Thickness(0, 0, 15, 0),
|
||||
|
||||
@@ -19,7 +19,7 @@ public sealed class ImplanterStatusControl : Control
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
_parent = parent;
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
_label.MaxWidth = 350;
|
||||
AddChild(new ClipControl { Children = { _label } });
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Content.Client.Info
|
||||
|
||||
PopulateTutorial(tutorialList);
|
||||
|
||||
Contents.AddChild(rootContainer);
|
||||
ContentsContainer.AddChild(rootContainer);
|
||||
|
||||
SetSize = new Vector2(650, 650);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
Text="{Loc 'ui-rules-accept'}"
|
||||
Disabled="True" />
|
||||
<Button Name="QuitButton"
|
||||
StyleClasses="Caution"
|
||||
StyleClasses="negative"
|
||||
Text="{Loc 'ui-escape-quit'}" />
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace Content.Client.Inventory
|
||||
var button = new Button()
|
||||
{
|
||||
Text = Loc.GetString("strippable-bound-user-interface-stripping-menu-ensnare-button"),
|
||||
StyleClasses = { StyleBase.ButtonOpenRight }
|
||||
StyleClasses = { StyleClass.ButtonOpenRight }
|
||||
};
|
||||
|
||||
button.OnPressed += (_) => SendPredictedMessage(new StrippingEnsnareButtonPressed());
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
xmlns="https://spacestation14.io"
|
||||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
|
||||
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
|
||||
xmlns:style="clr-namespace:Content.Client.Stylesheets"
|
||||
Title="{Loc 'microwave-menu-title'}"
|
||||
MinWidth="512"
|
||||
MinSize="512 256">
|
||||
@@ -78,14 +77,14 @@
|
||||
Name="StartButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'microwave-menu-start-button'}"
|
||||
StyleClasses="ButtonColorGreen"
|
||||
StyleClasses="positive"
|
||||
TextAlign="Center" />
|
||||
<Button
|
||||
Name="EjectButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'microwave-menu-eject-all-text'}"
|
||||
ToolTip="{Loc 'microwave-menu-eject-all-tooltip'}"
|
||||
StyleClasses="ButtonColorRed"
|
||||
StyleClasses="negative"
|
||||
TextAlign="Center" />
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Content.Client.LateJoin
|
||||
VerticalExpand = true,
|
||||
};
|
||||
|
||||
Contents.AddChild(_base);
|
||||
ContentsContainer.AddChild(_base);
|
||||
|
||||
_jobRequirements.Updated += RebuildUI;
|
||||
RebuildUI();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
|
||||
<parallax:ParallaxControl SpeedX="20"/>
|
||||
<Control HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<PanelContainer StyleClasses="AngleRect" />
|
||||
<PanelContainer StyleClasses="BackgroundPanel" />
|
||||
<BoxContainer Orientation="Vertical" MinSize="300 200">
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Label Margin="8 0 0 0" Text="{Loc 'connecting-title'}"
|
||||
@@ -68,7 +68,7 @@
|
||||
</BoxContainer>
|
||||
</Control>
|
||||
<!-- Bottom window for tips -->
|
||||
<PanelContainer Name="LoginTips" StyleClasses="AngleRect" Margin="0 10" MaxWidth="600" VerticalExpand="True" VerticalAlignment="Bottom">
|
||||
<PanelContainer Name="LoginTips" StyleClasses="BackgroundPanel" Margin="0 10" MaxWidth="600" VerticalExpand="True" VerticalAlignment="Bottom">
|
||||
<BoxContainer Orientation="Vertical" VerticalExpand="True">
|
||||
<controls:StripeBack>
|
||||
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Content.Client.Launcher
|
||||
|
||||
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
||||
|
||||
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
|
||||
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSystem;
|
||||
|
||||
ChangeLoginTip();
|
||||
RetryButton.OnPressed += ReconnectButtonPressed;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<Button Name="ConfirmDeleteButton"
|
||||
Text="{Loc 'character-setup-gui-character-picker-button-confirm-delete-button'}"
|
||||
Visible="False"
|
||||
ModulateSelfOverride="{x:Static style:StyleNano.ButtonColorCautionDefault}"/>
|
||||
StyleClasses="negative"/>
|
||||
|
||||
</BoxContainer>
|
||||
</ContainerButton>
|
||||
|
||||
@@ -28,19 +28,13 @@
|
||||
Text="{Loc 'character-setup-gui-character-setup-close-button'}"
|
||||
StyleClasses="ButtonBig"/>
|
||||
</BoxContainer>
|
||||
<PanelContainer>
|
||||
<PanelContainer.PanelOverride>
|
||||
<gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
|
||||
</PanelContainer.PanelOverride>
|
||||
<PanelContainer StyleClasses="highlight">
|
||||
</PanelContainer>
|
||||
<BoxContainer Orientation="Horizontal" VerticalExpand="True" SeparationOverride="0">
|
||||
<ScrollContainer MinSize="325 0" Margin="5 5 0 0">
|
||||
<BoxContainer Name="Characters" Orientation="Vertical" />
|
||||
</ScrollContainer>
|
||||
<PanelContainer MinSize="2 0">
|
||||
<PanelContainer.PanelOverride>
|
||||
<gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
|
||||
</PanelContainer.PanelOverride>
|
||||
<PanelContainer MinSize="2 0" StyleClasses="highlight">
|
||||
</PanelContainer>
|
||||
<BoxContainer Name="CharEditor" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
|
||||
@@ -6,8 +6,8 @@ using Content.Client.Lobby.UI.Loadouts;
|
||||
using Content.Client.Lobby.UI.Roles;
|
||||
using Content.Client.Message;
|
||||
using Content.Client.Players.PlayTimeTracking;
|
||||
using Content.Client.Sprite;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Client.Sprite;
|
||||
using Content.Client.UserInterface.Systems.Guidebook;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Clothing;
|
||||
@@ -539,7 +539,7 @@ namespace Content.Client.Lobby.UI
|
||||
{
|
||||
Text = Loc.GetString(category.Name),
|
||||
Margin = new Thickness(0, 10, 0, 0),
|
||||
StyleClasses = { StyleBase.StyleClassLabelHeading },
|
||||
StyleClasses = { StyleClass.LabelHeading },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1348,7 +1348,7 @@ namespace Content.Client.Lobby.UI
|
||||
return;
|
||||
|
||||
const string style = "SpeciesInfoDefault";
|
||||
SpeciesInfoButton.StyleClasses.Add(style);
|
||||
SpeciesInfoButton.StyleIdentifier = style;
|
||||
}
|
||||
|
||||
private void UpdateMarkings()
|
||||
|
||||
28
Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs
Normal file
28
Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Content.Client.Resources;
|
||||
using Content.Client.Stylesheets;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using static Content.Client.Stylesheets.StylesheetHelpers;
|
||||
|
||||
namespace Content.Client.Lobby.UI;
|
||||
|
||||
[CommonSheetlet]
|
||||
public sealed class HumanoidProfileEditorSheetlet : Sheetlet<PalettedStylesheet>
|
||||
{
|
||||
public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
|
||||
{
|
||||
return
|
||||
[
|
||||
E<TextureButton>()
|
||||
.Identifier("SpeciesInfoDefault")
|
||||
.Prop(TextureButton.StylePropertyTexture,
|
||||
ResCache.GetTexture("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
|
||||
// copied from `StyleNano`, but this is unused
|
||||
// E<TextureButton>()
|
||||
// .Identifier("SpeciesInfoWarning")
|
||||
// .Prop(TextureButton.StylePropertyTexture,
|
||||
// ResCache.GetTexture("/Textures/Interface/info.svg.192dpi.png"))
|
||||
// .Prop(Control.StylePropertyModulateSelf, sheet.HighlightPalette[0]),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<BoxContainer xmlns="https://spacestation14.io"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Orientation="Vertical">
|
||||
<PanelContainer StyleClasses="AngleRect" HorizontalExpand="True" Margin="5">
|
||||
<PanelContainer StyleClasses="BackgroundPanel" HorizontalExpand="True" Margin="5">
|
||||
<BoxContainer Name="LoadoutsContainer" Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True"/>
|
||||
</PanelContainer>
|
||||
<!-- Buffer space so we have 10 margin between controls but also 10 to the borders -->
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<Control Name="DefaultState" VerticalExpand="True">
|
||||
<BoxContainer Name="TopLeft" Orientation="Vertical">
|
||||
<!-- Left Top Panel -->
|
||||
<PanelContainer StyleClasses="AngleRect" HorizontalAlignment="Left" Name="LeftSideTop"
|
||||
<PanelContainer StyleClasses="BackgroundPanel" HorizontalAlignment="Left" Name="LeftSideTop"
|
||||
VerticalAlignment="Top">
|
||||
<BoxContainer Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="800">
|
||||
<info:LinkBanner Name="LinkBanner" VerticalExpand="false" HorizontalAlignment="Center"
|
||||
@@ -53,7 +53,7 @@
|
||||
<!-- Left Bot Panel -->
|
||||
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom">
|
||||
<info:DevInfoBanner Name="DevInfoBanner" VerticalExpand="false" Margin="3 3 3 3" />
|
||||
<PanelContainer StyleClasses="AngleRect">
|
||||
<PanelContainer StyleClasses="BackgroundPanel">
|
||||
<RichTextLabel Name="LobbySong" Access="Public" HorizontalAlignment="Center" />
|
||||
</PanelContainer>
|
||||
</BoxContainer>
|
||||
@@ -63,7 +63,7 @@
|
||||
<Control Access="Public" Visible="False" Name="CharacterSetupState" VerticalExpand="True" />
|
||||
</BoxContainer>
|
||||
<!-- Right Panel -->
|
||||
<PanelContainer Name="RightSide" Access="Public" StyleClasses="AngleRect" HorizontalAlignment="Right" VerticalExpand="True"
|
||||
<PanelContainer Name="RightSide" Access="Public" StyleClasses="BackgroundPanel" HorizontalAlignment="Right" VerticalExpand="True"
|
||||
VerticalAlignment="Stretch">
|
||||
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
|
||||
<!-- Top row -->
|
||||
@@ -73,7 +73,7 @@
|
||||
HorizontalExpand="True" HorizontalAlignment="Center" />
|
||||
</BoxContainer>
|
||||
<!-- Gold line -->
|
||||
<controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" />
|
||||
<controls:HLine StyleClasses="highlight" Thickness="2" />
|
||||
<controls:HSpacer Spacing="10" />
|
||||
<!-- Voting & misc button bar -->
|
||||
<BoxContainer Orientation="Horizontal" MinSize="0 40" HorizontalAlignment="Right">
|
||||
@@ -97,7 +97,7 @@
|
||||
<controls:HSpacer Spacing="5" />
|
||||
<BoxContainer MinHeight="10" />
|
||||
<!-- Gold line -->
|
||||
<controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" Access="Public" />
|
||||
<controls:HLine StyleClasses="highlight" Thickness="2" Access="Public" />
|
||||
<controls:HSpacer Spacing="10" />
|
||||
<widgets:ChatBox Name="Chat" Access="Public" VerticalExpand="True" Margin="3 3 3 3" MinHeight="50" />
|
||||
</BoxContainer>
|
||||
@@ -111,7 +111,7 @@
|
||||
</PanelContainer>
|
||||
</SplitContainer>
|
||||
<PanelContainer Name="ExpandPanel"
|
||||
StyleClasses="AngleRect"
|
||||
StyleClasses="BackgroundPanel"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0 2 2 0"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<Button Name="NevermindButton" Text="{Loc 'observe-nevermind'}" SizeFlagsStretchRatio="1"/>
|
||||
<Control HorizontalExpand="True" SizeFlagsStretchRatio="2" />
|
||||
<cc:CommandButton Command="observe" Name="ObserveButton" StyleClasses="Caution" Text="{Loc 'observe-confirm'}" SizeFlagsStretchRatio="1"/>
|
||||
<cc:CommandButton Command="observe" Name="ObserveButton" StyleClasses="negative" Text="{Loc 'observe-confirm'}" SizeFlagsStretchRatio="1"/>
|
||||
<cc:CommandButton Command="observe admin" Name="ObserveAsAdminButton" Text="{Loc 'observe-as-admin'}" SizeFlagsStretchRatio="1" Visible="False"/>
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
|
||||
@@ -31,9 +31,9 @@ public sealed partial class RequirementsSelector : BoxContainer
|
||||
RobustXamlLoader.Load(this);
|
||||
_options = new RadioOptions<int>(RadioOptionsLayout.Horizontal)
|
||||
{
|
||||
FirstButtonStyle = StyleBase.ButtonOpenRight,
|
||||
ButtonStyle = StyleBase.ButtonOpenBoth,
|
||||
LastButtonStyle = StyleBase.ButtonOpenLeft,
|
||||
FirstButtonStyle = StyleClass.ButtonOpenRight,
|
||||
ButtonStyle = StyleClass.ButtonOpenBoth,
|
||||
LastButtonStyle = StyleClass.ButtonOpenLeft,
|
||||
HorizontalExpand = true,
|
||||
};
|
||||
//Override default radio option button width
|
||||
@@ -50,7 +50,7 @@ public sealed partial class RequirementsSelector : BoxContainer
|
||||
Text = Loc.GetString("role-timer-locked"),
|
||||
Visible = true,
|
||||
HorizontalAlignment = HAlignment.Center,
|
||||
StyleClasses = {StyleBase.StyleClassLabelSubText},
|
||||
StyleClasses = {StyleClass.LabelSubText},
|
||||
};
|
||||
|
||||
_lockStripe = new StripeBack()
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace Content.Client.MainMenu.UI;
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class MainMenuControl : Control
|
||||
{
|
||||
public const string StyleIdentifierMainMenu = "mainMenu";
|
||||
public const string StyleIdentifierMainMenuVBox = "mainMenuVBox";
|
||||
|
||||
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
27
Content.Client/MainMenu/UI/MainMenuSheetlet.cs
Normal file
27
Content.Client/MainMenu/UI/MainMenuSheetlet.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Client.Stylesheets.Fonts;
|
||||
using Content.Client.Stylesheets.Stylesheets;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using static Content.Client.Stylesheets.StylesheetHelpers;
|
||||
|
||||
namespace Content.Client.MainMenu.UI;
|
||||
|
||||
[CommonSheetlet]
|
||||
public sealed class MainMenuSheetlet : Sheetlet<NanotrasenStylesheet>
|
||||
{
|
||||
public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
|
||||
{
|
||||
return
|
||||
[
|
||||
// make those buttons bigger
|
||||
E<Button>()
|
||||
.Identifier(MainMenuControl.StyleIdentifierMainMenu)
|
||||
.ParentOf(E<Label>())
|
||||
.Font(sheet.BaseFont.GetFont(16, FontKind.Bold)),
|
||||
E<BoxContainer>()
|
||||
.Identifier(MainMenuControl.StyleIdentifierMainMenuVBox)
|
||||
.Prop(BoxContainer.StylePropertySeparation, 2),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<Control xmlns="https://spacestation14.io"
|
||||
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
|
||||
MouseFilter="Stop">
|
||||
<PanelContainer StyleClasses="BackgroundOpenLeft"/>
|
||||
<PanelContainer StyleClasses="BackgroundPanelOpenLeft"/>
|
||||
<PanelContainer>
|
||||
<PanelContainer.PanelOverride>
|
||||
<graphics:StyleBoxFlat BorderColor="#25252A" BorderThickness="0 0 0 3"/>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Label Text="{Loc news-write-ui-article-name-label}" Margin="17 10 0 9" VerticalAlignment="Center"/>
|
||||
<LineEdit Name="TitleField" Margin="6 10 0 9" MinWidth="260" MinHeight="23" Access="Public"/>
|
||||
<Control HorizontalExpand="True" />
|
||||
<Label Name="RichTextInfoLabel" Text="?" MouseFilter="Pass" Margin="14 0" StyleClasses="LabelSecondaryColor"/>
|
||||
<Label Name="RichTextInfoLabel" Text="?" MouseFilter="Pass" Margin="14 0" StyleClasses="LabelWeak"/>
|
||||
</BoxContainer>
|
||||
<Control Name="TextEditPanel" VerticalExpand="True" Margin="11 0 11 0">
|
||||
<PanelContainer>
|
||||
@@ -43,7 +43,7 @@
|
||||
<BoxContainer Orientation="Horizontal" Margin="12 5 12 8">
|
||||
<Control>
|
||||
<Button Name="ButtonCancel" SetHeight="32" SetWidth="85"
|
||||
StyleClasses="ButtonColorRed" Text="{Loc news-write-ui-cancel-text}"/>
|
||||
StyleClasses="negative" Text="{Loc news-write-ui-cancel-text}"/>
|
||||
</Control>
|
||||
<Control HorizontalExpand="True"/>
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
|
||||
@@ -22,8 +22,8 @@ public sealed partial class ArticleEditorPanel : Control
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
ButtonPublish.StyleClasses.Add(StyleBase.ButtonOpenLeft);
|
||||
ButtonPublish.StyleClasses.Add(StyleNano.StyleClassButtonColorGreen);
|
||||
ButtonPublish.StyleClasses.Add(StyleClass.ButtonOpenLeft);
|
||||
ButtonPublish.StyleClasses.Add(StyleClass.Positive);
|
||||
|
||||
ContentField.GetChild(0).Margin = new Thickness(9, 3);
|
||||
// Customize scrollbar width and margin. This is not possible in xaml
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
|
||||
Margin="0 0 0 8">
|
||||
<PanelContainer StyleClasses="AngleRect" ModulateSelfOverride="#2b2b31"/>
|
||||
<PanelContainer StyleClasses="BackgroundPanel" ModulateSelfOverride="#2b2b31"/>
|
||||
<BoxContainer Orientation="Vertical" SetHeight="60">
|
||||
<Control HorizontalExpand="True" SetHeight="27">
|
||||
<PanelContainer>
|
||||
@@ -21,7 +21,7 @@
|
||||
HorizontalAlignment="Right" Margin="8 6 6 6" SetHeight="19" SetWidth="52" Access="Public">
|
||||
<Button.StyleClasses>
|
||||
<system:String>ButtonSmall</system:String>
|
||||
<system:String>ButtonColorRed</system:String>
|
||||
<system:String>negative</system:String>
|
||||
</Button.StyleClasses>
|
||||
</controls:ConfirmButton>
|
||||
</BoxContainer>
|
||||
|
||||
@@ -77,11 +77,11 @@ public sealed partial class MaterialDisplay : PanelContainer
|
||||
{
|
||||
var sheetsToEject = sheetsToEjectArray[i];
|
||||
|
||||
var styleClass = StyleBase.ButtonOpenBoth;
|
||||
var styleClass = StyleClass.ButtonOpenBoth;
|
||||
if (i == 0)
|
||||
styleClass = StyleBase.ButtonOpenRight;
|
||||
styleClass = StyleClass.ButtonOpenRight;
|
||||
else if (i == sheetsToEjectArray.Length - 1)
|
||||
styleClass = StyleBase.ButtonOpenLeft;
|
||||
styleClass = StyleClass.ButtonOpenLeft;
|
||||
|
||||
var button = new Button
|
||||
{
|
||||
|
||||
@@ -130,7 +130,7 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
|
||||
};
|
||||
|
||||
deparmentLabel.SetMessage(department);
|
||||
deparmentLabel.StyleClasses.Add(StyleNano.StyleClassTooltipActionDescription);
|
||||
deparmentLabel.StyleClasses.Add("font-large");
|
||||
|
||||
SensorsTable.AddChild(deparmentLabel);
|
||||
|
||||
@@ -156,7 +156,6 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
|
||||
};
|
||||
|
||||
deparmentLabel.SetMessage(Loc.GetString("crew-monitoring-ui-no-department-label"));
|
||||
deparmentLabel.StyleClasses.Add(StyleNano.StyleClassTooltipActionDescription);
|
||||
|
||||
SensorsTable.AddChild(deparmentLabel);
|
||||
|
||||
@@ -194,7 +193,7 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
|
||||
};
|
||||
|
||||
if (sensor.SuitSensorUid == _trackedEntity)
|
||||
sensorButton.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
sensorButton.AddStyleClass(StyleClass.Positive);
|
||||
|
||||
SensorsTable.AddChild(sensorButton);
|
||||
|
||||
@@ -364,10 +363,10 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
|
||||
var castSensor = (CrewMonitoringButton) sensor;
|
||||
|
||||
if (castSensor.SuitSensorUid == prevTrackedEntity)
|
||||
castSensor.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
castSensor.RemoveStyleClass(StyleClass.Positive);
|
||||
|
||||
else if (castSensor.SuitSensorUid == currTrackedEntity)
|
||||
castSensor.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
castSensor.AddStyleClass(StyleClass.Positive);
|
||||
|
||||
if (castSensor?.Coordinates == null)
|
||||
continue;
|
||||
|
||||
@@ -15,8 +15,8 @@ public sealed partial class NetworkConfiguratorConfigurationMenu : FancyWindow
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
Clear.StyleClasses.Add(StyleBase.ButtonOpenLeft);
|
||||
Clear.StyleClasses.Add(StyleNano.StyleClassButtonColorRed);
|
||||
Clear.StyleClasses.Add(StyleClass.ButtonOpenLeft);
|
||||
Clear.StyleClasses.Add(StyleClass.Negative);
|
||||
DeviceList.OnRemoveAddress += args =>
|
||||
{
|
||||
OnRemoveAddress?.Invoke(args);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<ScrollContainer xmlns="https://spacestation14.io"
|
||||
HorizontalExpand="True"
|
||||
VerticalExpand="True">
|
||||
<Control VerticalExpand="True">
|
||||
<PanelContainer StyleClasses="PanelBackgroundBaseDark"></PanelContainer>
|
||||
<PanelContainer StyleClasses="PanelDark" VerticalExpand="True">
|
||||
<BoxContainer Orientation="Vertical" Name="DeviceList" VerticalExpand="True" SeparationOverride="4">
|
||||
</BoxContainer>
|
||||
</Control>
|
||||
</PanelContainer>
|
||||
</ScrollContainer>
|
||||
|
||||
@@ -47,7 +47,7 @@ public sealed partial class NetworkConfiguratorLinkMenu : FancyWindow
|
||||
FooterPanel.PanelOverride = footerStyleBox;
|
||||
MainPanel.PanelOverride = new StyleBoxFlat(Color.FromHex(PanelBgColor));
|
||||
|
||||
ButtonClear.AddStyleClass("ButtonColorRed");
|
||||
ButtonClear.AddStyleClass("negative");
|
||||
ButtonLinkDefault.Disabled = true;
|
||||
|
||||
_links = new LinksRender(ButtonContainerLeft, ButtonContainerRight);
|
||||
|
||||
@@ -112,7 +112,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
||||
{
|
||||
_configurator = configurator;
|
||||
_keyBindingName = keyBindingName;
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
AddChild(_label);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<Button Name="ArmButton"
|
||||
Text="{Loc 'nuke-user-interface-arm-button'}"
|
||||
Access="Public"
|
||||
StyleClasses="Caution"/>
|
||||
StyleClasses="negative"/>
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
Access="Public" />
|
||||
<Button Name="WarButton"
|
||||
Text="{Loc 'war-declarator-ui-try-war-button'}"
|
||||
StyleClasses="Caution"
|
||||
StyleClasses="negative"
|
||||
Access="Public"/>
|
||||
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
|
||||
<Label Name="StatusLabel"
|
||||
|
||||
@@ -58,38 +58,38 @@ public sealed partial class WarDeclaratorWindow : FancyWindow
|
||||
WarButton.Disabled = true;
|
||||
StatusLabel.Text = Loc.GetString("war-declarator-boost-declared");
|
||||
UpdateTimer();
|
||||
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateLow);
|
||||
StatusLabel.SetOnlyStyleClass(StyleClass.Highlight);
|
||||
break;
|
||||
case WarConditionStatus.YesWar:
|
||||
WarButton.Text = Loc.GetString("war-declarator-ui-war-button");
|
||||
StatusLabel.Text = Loc.GetString("war-declarator-boost-possible");
|
||||
UpdateTimer();
|
||||
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood);
|
||||
StatusLabel.SetOnlyStyleClass(StyleClass.Positive);
|
||||
break;
|
||||
case WarConditionStatus.NoWarSmallCrew:
|
||||
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
|
||||
InfoLabel.Text = Loc.GetString("war-declarator-conditions-small-crew");
|
||||
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
|
||||
StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
|
||||
break;
|
||||
case WarConditionStatus.NoWarShuttleDeparted:
|
||||
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
|
||||
InfoLabel.Text = Loc.GetString("war-declarator-conditions-left-outpost");
|
||||
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
|
||||
StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
|
||||
break;
|
||||
case WarConditionStatus.NoWarTimeout:
|
||||
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
|
||||
InfoLabel.Text = Loc.GetString("war-declarator-conditions-time-out");
|
||||
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
|
||||
StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
|
||||
break;
|
||||
case WarConditionStatus.NoWarUnknown:
|
||||
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
|
||||
InfoLabel.Text = Loc.GetString("war-declarator-conditions-unknown");
|
||||
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
|
||||
StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
|
||||
break;
|
||||
default:
|
||||
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
|
||||
InfoLabel.Text = Loc.GetString("war-declarator-conditions-unknown");
|
||||
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
|
||||
StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<Button Name="ResetButton"
|
||||
Text="{Loc 'ui-options-reset-all'}"
|
||||
StyleClasses="Caution" />
|
||||
StyleClasses="negative" />
|
||||
<Button Name="ApplyButton"
|
||||
Text="{Loc 'ui-options-apply'}"
|
||||
StyleClasses="OpenLeft" />
|
||||
|
||||
@@ -58,7 +58,7 @@ public sealed partial class OptionsTabControlRow : Control
|
||||
RobustXamlLoader.Load(this);
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
ResetButton.StyleClasses.Add(StyleBase.ButtonOpenRight);
|
||||
ResetButton.StyleClasses.Add(StyleClass.ButtonOpenRight);
|
||||
ApplyButton.OnPressed += ApplyButtonPressed;
|
||||
ResetButton.OnPressed += ResetButtonPressed;
|
||||
DefaultButton.OnPressed += DefaultButtonPressed;
|
||||
|
||||
@@ -130,8 +130,7 @@ namespace Content.Client.Options.UI.Tabs
|
||||
KeybindsContainer.AddChild(new Label
|
||||
{
|
||||
Text = Loc.GetString(headerContents),
|
||||
FontColorOverride = StyleNano.NanoGold,
|
||||
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||
StyleClasses = { StyleClass.LabelKeyText }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -528,9 +527,9 @@ namespace Content.Client.Options.UI.Tabs
|
||||
HorizontalAlignment = HAlignment.Left
|
||||
};
|
||||
|
||||
BindButton1 = new BindButton(parent, this, StyleBase.ButtonOpenRight);
|
||||
BindButton2 = new BindButton(parent, this, StyleBase.ButtonOpenLeft);
|
||||
ResetButton = new Button { Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = { StyleBase.ButtonCaution } };
|
||||
BindButton1 = new BindButton(parent, this, StyleClass.ButtonOpenRight);
|
||||
BindButton2 = new BindButton(parent, this, StyleClass.ButtonOpenLeft);
|
||||
ResetButton = new Button { Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = { StyleClass.Negative } };
|
||||
|
||||
var hBox = new BoxContainer
|
||||
{
|
||||
|
||||
93
Content.Client/PDA/PdaSheetlet.cs
Normal file
93
Content.Client/PDA/PdaSheetlet.cs
Normal file
@@ -0,0 +1,93 @@
|
||||
using Content.Client.PDA;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Client.Stylesheets.Sheetlets;
|
||||
using Content.Client.Stylesheets.SheetletConfigs;
|
||||
using Content.Client.Stylesheets.Stylesheets;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using static Content.Client.Stylesheets.StylesheetHelpers;
|
||||
|
||||
namespace Content.Client.PDA;
|
||||
|
||||
[CommonSheetlet]
|
||||
public sealed class PdaSheetlet : Sheetlet<NanotrasenStylesheet>
|
||||
{
|
||||
public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
|
||||
{
|
||||
IPanelConfig panelCfg = sheet;
|
||||
IButtonConfig btnCfg = sheet;
|
||||
|
||||
// TODO: This should have its own set of images, instead of using button cfg directly.
|
||||
var angleBorderRect =
|
||||
sheet.GetTexture(panelCfg.GeometricPanelBorderPath).IntoPatch(StyleBox.Margin.All, 10);
|
||||
|
||||
return
|
||||
[
|
||||
//PDA - Backgrounds
|
||||
E<PanelContainer>()
|
||||
.Class("PdaContentBackground")
|
||||
.Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.SquareStyleBox(sheet))
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#25252a")),
|
||||
|
||||
E<PanelContainer>()
|
||||
.Class("PdaBackground")
|
||||
.Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.SquareStyleBox(sheet))
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#000000")),
|
||||
|
||||
E<PanelContainer>()
|
||||
.Class("PdaBackgroundRect")
|
||||
.Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.BaseStyleBox((sheet)))
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#717059")),
|
||||
|
||||
E<PanelContainer>()
|
||||
.Class("PdaBorderRect")
|
||||
.Prop(PanelContainer.StylePropertyPanel, angleBorderRect),
|
||||
|
||||
//PDA - Buttons
|
||||
E<PdaSettingsButton>()
|
||||
.Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
|
||||
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
|
||||
|
||||
E<PdaSettingsButton>()
|
||||
.Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.HoverColor))
|
||||
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
|
||||
|
||||
E<PdaSettingsButton>()
|
||||
.Pseudo(ContainerButton.StylePseudoClassPressed)
|
||||
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.PressedColor))
|
||||
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
|
||||
|
||||
E<PdaSettingsButton>()
|
||||
.Pseudo(ContainerButton.StylePseudoClassDisabled)
|
||||
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
|
||||
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.DisabledFgColor)),
|
||||
|
||||
E<PdaProgramItem>()
|
||||
.Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.NormalBgColor)),
|
||||
|
||||
E<PdaProgramItem>()
|
||||
.Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
|
||||
|
||||
E<PdaProgramItem>()
|
||||
.Pseudo(ContainerButton.StylePseudoClassPressed)
|
||||
.Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
|
||||
|
||||
//PDA - Text
|
||||
E<Label>()
|
||||
.Class("PdaContentFooterText")
|
||||
.Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(10))
|
||||
.Prop(Label.StylePropertyFontColor, Color.FromHex("#757575")),
|
||||
|
||||
E<Label>()
|
||||
.Class("PdaWindowFooterText")
|
||||
.Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(10))
|
||||
.Prop(Label.StylePropertyFontColor, Color.FromHex("#333d3b")),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,12 +43,12 @@ namespace Content.Client.PDA.Ringer
|
||||
if (!isValid)
|
||||
{
|
||||
input.Text = PreviousNoteInputs[index];
|
||||
input.AddStyleClass("Caution");
|
||||
input.AddStyleClass("highlight");
|
||||
}
|
||||
else
|
||||
{
|
||||
PreviousNoteInputs[index] = input.Text;
|
||||
input.RemoveStyleClass("Caution");
|
||||
input.RemoveStyleClass("highlight");
|
||||
}
|
||||
|
||||
input.CursorPosition = input.Text.Length;
|
||||
@@ -59,7 +59,7 @@ namespace Content.Client.PDA.Ringer
|
||||
if (!IsNote(input.Text))
|
||||
{
|
||||
input.Text = PreviousNoteInputs[index];
|
||||
input.RemoveStyleClass("Caution");
|
||||
input.RemoveStyleClass("highlight");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Content.Client.PDA.Ringer
|
||||
if (!IsNote(input.Text))
|
||||
{
|
||||
input.Text = PreviousNoteInputs[index];
|
||||
input.RemoveStyleClass("Caution");
|
||||
input.RemoveStyleClass("highlight");
|
||||
}
|
||||
input.CursorPosition = input.Text.Length;
|
||||
};
|
||||
|
||||
33
Content.Client/Paper/UI/PaperSheetlet.cs
Normal file
33
Content.Client/Paper/UI/PaperSheetlet.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Content.Client.Resources;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Client.Stylesheets.SheetletConfigs;
|
||||
using Content.Client.Stylesheets.Stylesheets;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using static Content.Client.Stylesheets.StylesheetHelpers;
|
||||
|
||||
namespace Content.Client.Paper.UI;
|
||||
|
||||
[CommonSheetlet]
|
||||
public sealed class PaperSheetlet : Sheetlet<NanotrasenStylesheet>
|
||||
{
|
||||
public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
|
||||
{
|
||||
var windowCfg = (IWindowConfig)sheet;
|
||||
|
||||
var paperBackground = ResCache.GetTexture("/Textures/Interface/Paper/paper_background_default.svg.96dpi.png")
|
||||
.IntoPatch(StyleBox.Margin.All, 16);
|
||||
var paperBox = new StyleBoxTexture
|
||||
{ Texture = sheet.GetTexture(windowCfg.TransparentWindowBackgroundBorderedPath) };
|
||||
paperBox.SetPatchMargin(StyleBox.Margin.All, 2);
|
||||
|
||||
return
|
||||
[
|
||||
E<PanelContainer>().Identifier("PaperContainer").Panel(paperBox),
|
||||
E<PanelContainer>()
|
||||
.Identifier("PaperDefaultBorder")
|
||||
.Prop(PanelContainer.StylePropertyPanel, paperBackground),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -4,18 +4,18 @@
|
||||
SetSize="510 660"> <!-- Provide some reasonable sizes by default. Can be changed by the component -->
|
||||
|
||||
<BoxContainer Name="ContentsRoot" Orientation="Vertical">
|
||||
<PanelContainer StyleClasses="AngleRect" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="6">
|
||||
<PanelContainer StyleClasses="BackgroundPanel" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="6">
|
||||
<TextureButton Name="CloseButton" StyleClasses="windowCloseButton"/>
|
||||
</PanelContainer>
|
||||
<PanelContainer Name="PaperBackground" StyleClasses="PaperDefaultBorder" VerticalExpand="True" HorizontalExpand="True">
|
||||
<PanelContainer Name="PaperBackground" StyleIdentifier="PaperDefaultBorder" VerticalExpand="True" HorizontalExpand="True">
|
||||
<ScrollContainer Name="ScrollingContents" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalExpand="True" VerticalExpand="True" HScrollEnabled="False">
|
||||
<PanelContainer Name="PaperContent" VerticalExpand="True" HorizontalExpand="True" MaxWidth="600">
|
||||
<BoxContainer Orientation="Vertical" VerticalAlignment="Stretch">
|
||||
<TextureButton Name="HeaderImage" HorizontalAlignment="Center" VerticalAlignment="Top" MouseFilter="Ignore"/>
|
||||
<Control Name="TextAlignmentPadding" VerticalAlignment="Top"/>
|
||||
<RichTextLabel Name="BlankPaperIndicator" StyleClasses="LabelSecondaryColor" VerticalAlignment="Top" HorizontalAlignment="Center"/>
|
||||
<RichTextLabel Name="BlankPaperIndicator" StyleClasses="LabelWeak" VerticalAlignment="Top" HorizontalAlignment="Center"/>
|
||||
<RichTextLabel StyleClasses="PaperWrittenText" Name="WrittenTextLabel" VerticalAlignment="Top"/>
|
||||
<BoxContainer Name="InputContainer" Orientation="Vertical" VerticalExpand="True" VerticalAlignment="Stretch">
|
||||
<BoxContainer Name="InputContainer" StyleIdentifier="PaperContainer" Orientation="Vertical" VerticalExpand="True" VerticalAlignment="Stretch">
|
||||
<PanelContainer StyleClasses="TransparentBorderedWindowPanel" MinHeight="100"
|
||||
VerticalAlignment="Stretch" VerticalExpand="True" HorizontalExpand="True">
|
||||
<TextEdit Name="Input" StyleClasses="PaperLineEdit" Access="Public" />
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<paper:StampWidget xmlns="https://spacestation14.io"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:style="clr-namespace:Content.Client.Stylesheets"
|
||||
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
|
||||
xmlns:paper="clr-namespace:Content.Client.Paper.UI" HorizontalAlignment="Center" Margin="6">
|
||||
|
||||
<paper:StampLabel Name="StampedByLabel" StyleClasses="LabelHeadingBigger"
|
||||
FontColorOverride="{x:Static style:StyleNano.DangerousRedFore}"
|
||||
Margin="12 6 12 6"/>
|
||||
xmlns:paper="clr-namespace:Content.Client.Paper.UI"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="6">
|
||||
<paper:StampLabel Name="StampedByLabel" StyleClasses="LabelHeadingBigger" Margin="12 6 12 6" />
|
||||
</paper:StampWidget>
|
||||
|
||||
@@ -128,11 +128,7 @@ public partial class NavMapControl : MapGridControl
|
||||
|
||||
var topPanel = new PanelContainer()
|
||||
{
|
||||
PanelOverride = new StyleBoxFlat()
|
||||
{
|
||||
BackgroundColor = StyleNano.ButtonColorContext.WithAlpha(1f),
|
||||
BorderColor = StyleNano.PanelDark
|
||||
},
|
||||
StyleClasses = { StyleClass.PanelDark },
|
||||
VerticalExpand = false,
|
||||
HorizontalExpand = true,
|
||||
SetWidth = 650f,
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
<GridContainer Margin="10 0 0 0" Columns="2">
|
||||
<!-- Power On/Off -->
|
||||
<Label Text="{Loc 'apc-menu-breaker-label'}" HorizontalExpand="True"
|
||||
StyleClasses="StatusFieldTitle" MinWidth="120"/>
|
||||
StyleClasses="highlight" MinWidth="120"/>
|
||||
<BoxContainer Orientation="Horizontal" MinWidth="90">
|
||||
<Button Name="BreakerButton" Text="{Loc 'apc-menu-breaker-button'}" HorizontalExpand="True" ToggleMode="True"/>
|
||||
</BoxContainer>
|
||||
<!--Charging Status-->
|
||||
<Label Text="{Loc 'apc-menu-external-label'}" StyleClasses="StatusFieldTitle" MinWidth="120" />
|
||||
<Label Text="{Loc 'apc-menu-external-label'}" StyleClasses="highlight" MinWidth="120" />
|
||||
<Label Name="ExternalPowerStateLabel" Text="{Loc 'apc-menu-power-state-good'}" />
|
||||
<!--Battery Power-->
|
||||
<Label Text="{Loc 'apc-menu-power-label'}" StyleClasses="StatusFieldTitle" MinWidth="120" />
|
||||
<Label Text="{Loc 'apc-menu-power-label'}" StyleClasses="highlight" MinWidth="120" />
|
||||
<Label Name="PowerLabel"/>
|
||||
</GridContainer>
|
||||
</BoxContainer>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -7,10 +7,6 @@ using System.Numerics;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Shared.APC;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using FancyWindow = Content.Client.UserInterface.Controls.FancyWindow;
|
||||
|
||||
namespace Content.Client.Power.APC.UI
|
||||
@@ -44,7 +40,7 @@ namespace Content.Client.Power.APC.UI
|
||||
|
||||
if (PowerLabel != null)
|
||||
{
|
||||
PowerLabel.Text = castState.Power + " W";
|
||||
PowerLabel.Text = Loc.GetString("apc-menu-power-state-label-text", ("power", castState.Power));
|
||||
}
|
||||
|
||||
if (ExternalPowerStateLabel != null)
|
||||
@@ -53,15 +49,15 @@ namespace Content.Client.Power.APC.UI
|
||||
{
|
||||
case ApcExternalPowerState.None:
|
||||
ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-none");
|
||||
ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
|
||||
ExternalPowerStateLabel.SetOnlyStyleClass("negative");
|
||||
break;
|
||||
case ApcExternalPowerState.Low:
|
||||
ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-low");
|
||||
ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateLow);
|
||||
ExternalPowerStateLabel.SetOnlyStyleClass("highlight");
|
||||
break;
|
||||
case ApcExternalPowerState.Good:
|
||||
ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-good");
|
||||
ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood);
|
||||
ExternalPowerStateLabel.SetOnlyStyleClass("positive");
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
|
||||
@@ -92,19 +92,19 @@ public sealed partial class GeneratorWindow : FancyWindow
|
||||
if (starting)
|
||||
{
|
||||
StatusLabel.Text = _loc.GetString("portable-generator-ui-status-starting");
|
||||
StatusLabel.SetOnlyStyleClass("Caution");
|
||||
StatusLabel.SetOnlyStyleClass("negative");
|
||||
|
||||
StartProgress.Value = progress;
|
||||
}
|
||||
else if (on)
|
||||
{
|
||||
StatusLabel.Text = _loc.GetString("portable-generator-ui-status-running");
|
||||
StatusLabel.SetOnlyStyleClass("Good");
|
||||
StatusLabel.SetOnlyStyleClass("positive");
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusLabel.Text = _loc.GetString("portable-generator-ui-status-stopped");
|
||||
StatusLabel.SetOnlyStyleClass("Danger");
|
||||
StatusLabel.SetOnlyStyleClass("highlight");
|
||||
}
|
||||
|
||||
var canSwitch = _entityManager.TryGetComponent(_entity, out PowerSwitchableComponent? switchable);
|
||||
@@ -131,7 +131,7 @@ public sealed partial class GeneratorWindow : FancyWindow
|
||||
("supply", netStats.Supply));
|
||||
|
||||
var good = netStats.Load <= netStats.Supply;
|
||||
NetworkStats.SetOnlyStyleClass(good ? "Good" : "Caution");
|
||||
NetworkStats.SetOnlyStyleClass(good ? "positive" : "highlight");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<controls:FancyWindow
|
||||
<controls:FancyWindow
|
||||
xmlns="https://spacestation14.io"
|
||||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
|
||||
MinSize="320 180"
|
||||
@@ -18,7 +18,7 @@
|
||||
<Label
|
||||
Text="{Loc 'power-charge-window-power'}"
|
||||
HorizontalExpand="True"
|
||||
StyleClasses="StatusFieldTitle" />
|
||||
StyleClasses="highlight" />
|
||||
|
||||
<BoxContainer
|
||||
Orientation="Horizontal"
|
||||
@@ -49,21 +49,21 @@
|
||||
<!-- Status -->
|
||||
<Label
|
||||
Text="{Loc 'power-charge-window-status'}"
|
||||
StyleClasses="StatusFieldTitle" />
|
||||
StyleClasses="highlight" />
|
||||
<Label Name="StatusLabel"
|
||||
Text="{Loc 'power-charge-window-status-fully-charged'}" />
|
||||
|
||||
<!-- ETA -->
|
||||
<Label
|
||||
Text="{Loc 'power-charge-window-eta'}"
|
||||
StyleClasses="StatusFieldTitle" />
|
||||
StyleClasses="highlight" />
|
||||
<Label Name="EtaLabel"
|
||||
Text="N/A" />
|
||||
|
||||
<!-- Charge -->
|
||||
<Label
|
||||
Text="{Loc 'power-charge-window-charge'}"
|
||||
StyleClasses="StatusFieldTitle" />
|
||||
StyleClasses="highlight" />
|
||||
|
||||
<ProgressBar Name="ChargeBar"
|
||||
MaxValue="255">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Client.Stylesheets.Palette;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Shared.Power;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
@@ -41,7 +42,10 @@ public sealed partial class PowerChargeWindow : FancyWindow
|
||||
("draw", state.PowerDraw),
|
||||
("max", state.PowerDrawMax));
|
||||
|
||||
PowerLabel.SetOnlyStyleClass(MathHelper.CloseTo(state.PowerDraw, state.PowerDrawMax) ? "Good" : "Caution");
|
||||
PowerLabel.FontColorOverride = MathHelper.CloseTo(state.PowerDraw, state.PowerDrawMax)
|
||||
? Palettes.Status.Good
|
||||
: Palettes.Status.Warning;
|
||||
// TODO: blend with status colors instead of setting hard values
|
||||
|
||||
ChargeBar.Value = state.Charge;
|
||||
ChargeText.Text = (state.Charge / 255f).ToString("P0");
|
||||
@@ -54,12 +58,12 @@ public sealed partial class PowerChargeWindow : FancyWindow
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
});
|
||||
|
||||
StatusLabel.SetOnlyStyleClass(state.PowerStatus switch
|
||||
StatusLabel.FontColorOverride = (state.PowerStatus switch
|
||||
{
|
||||
PowerChargePowerStatus.Off => "Danger",
|
||||
PowerChargePowerStatus.Discharging => "Caution",
|
||||
PowerChargePowerStatus.Charging => "Caution",
|
||||
PowerChargePowerStatus.FullyCharged => "Good",
|
||||
PowerChargePowerStatus.Off => Palettes.Status.Critical,
|
||||
PowerChargePowerStatus.Discharging => Palettes.Status.Warning,
|
||||
PowerChargePowerStatus.Charging => Palettes.Status.Warning,
|
||||
PowerChargePowerStatus.FullyCharged => Palettes.Status.Good,
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
});
|
||||
|
||||
@@ -67,6 +71,6 @@ public sealed partial class PowerChargeWindow : FancyWindow
|
||||
? Loc.GetString("power-charge-window-eta-value", ("left", TimeSpan.FromSeconds(state.EtaSeconds)))
|
||||
: Loc.GetString("power-charge-window-eta-none");
|
||||
|
||||
EtaLabel.SetOnlyStyleClass(state.EtaSeconds >= 0 ? "Caution" : "Disabled");
|
||||
EtaLabel.SetOnlyStyleClass(state.EtaSeconds >= 0 ? "highlight" : "LabelWeak");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,11 +67,11 @@
|
||||
|
||||
<!-- Power overview -->
|
||||
<GridContainer Columns="2">
|
||||
<Label StyleClasses="StatusFieldTitle" Text="{Loc 'power-monitoring-window-total-sources'}"/>
|
||||
<Label StyleClasses="highlight" Text="{Loc 'power-monitoring-window-total-sources'}"/>
|
||||
<Label Name="TotalSources" Text="?" Margin="10 0 0 0"/>
|
||||
<Label StyleClasses="StatusFieldTitle" Text="{Loc 'power-monitoring-window-total-battery-usage'}"/>
|
||||
<Label StyleClasses="highlight" Text="{Loc 'power-monitoring-window-total-battery-usage'}"/>
|
||||
<Label Name="TotalBatteryUsage" Text="?" Margin="10 0 0 0"/>
|
||||
<Label StyleClasses="StatusFieldTitle" Text="{Loc 'power-monitoring-window-total-loads'}"/>
|
||||
<Label StyleClasses="highlight" Text="{Loc 'power-monitoring-window-total-loads'}"/>
|
||||
<Label Name="TotalLoads" Text="?" Margin="10 0 0 0"/>
|
||||
</GridContainer>
|
||||
|
||||
|
||||
@@ -85,10 +85,10 @@ public sealed partial class PowerMonitoringWindow
|
||||
|
||||
// Update button style
|
||||
if (netEntity == _focusEntity)
|
||||
button.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
button.AddStyleClass(StyleClass.Positive);
|
||||
|
||||
else
|
||||
button.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
button.RemoveStyleClass(StyleClass.Positive);
|
||||
|
||||
// Update sprite
|
||||
if (entry.MetaData.Value.SpritePath != string.Empty && entry.MetaData.Value.SpriteState != string.Empty)
|
||||
@@ -185,7 +185,7 @@ public sealed partial class PowerMonitoringWindow
|
||||
// Toggle off button?
|
||||
if (entry.NetEntity == _focusEntity)
|
||||
{
|
||||
entry.Button.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
entry.Button.RemoveStyleClass(StyleClass.Positive);
|
||||
_focusEntity = null;
|
||||
|
||||
// Request an update from the power monitoring system
|
||||
@@ -195,7 +195,7 @@ public sealed partial class PowerMonitoringWindow
|
||||
}
|
||||
|
||||
// Otherwise, toggle on
|
||||
entry.Button.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
entry.Button.AddStyleClass(StyleClass.Positive);
|
||||
|
||||
ActivateAutoScrollToFocus();
|
||||
|
||||
@@ -206,7 +206,7 @@ public sealed partial class PowerMonitoringWindow
|
||||
{
|
||||
if (sibling.NetEntity == _focusEntity)
|
||||
{
|
||||
sibling.Button.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
sibling.Button.RemoveStyleClass(StyleClass.Positive);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public sealed class GeigerItemControl : Control
|
||||
public GeigerItemControl(GeigerComponent component)
|
||||
{
|
||||
_component = component;
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
AddChild(_label);
|
||||
|
||||
Update();
|
||||
|
||||
@@ -18,7 +18,7 @@ public sealed class DoorRemoteStatusControl : Control
|
||||
public DoorRemoteStatusControl(Entity<DoorRemoteComponent> entity)
|
||||
{
|
||||
_entity = entity;
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
AddChild(_label);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
xmlns:pllax="clr-namespace:Content.Client.Parallax">
|
||||
<pllax:ParallaxControl SpeedX="20"/>
|
||||
<Control HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<PanelContainer StyleClasses="AngleRect" />
|
||||
<PanelContainer StyleClasses="BackgroundPanel" />
|
||||
<BoxContainer Orientation="Vertical" SetSize="800 600" Margin="2">
|
||||
<ScrollContainer Name="what" VerticalExpand="True" HScrollEnabled="False" Margin="0 0 0 2" ReturnMeasure="True">
|
||||
<RichTextLabel Name="ReasonLabel" VerticalAlignment="Top" />
|
||||
</ScrollContainer>
|
||||
<Button Name="RetryButton" StyleClasses="Caution" Text="{Loc 'replay-loading-retry'}" Visible="False" />
|
||||
<Button Name="RetryButton" StyleClasses="negative" Text="{Loc 'replay-loading-retry'}" Visible="False" />
|
||||
<Button Name="CancelButton" Text="{Loc 'replay-loading-cancel'}" Visible="False" />
|
||||
</BoxContainer>
|
||||
</Control>
|
||||
|
||||
@@ -63,7 +63,7 @@ public sealed partial class RoboticsConsoleWindow : FancyWindow
|
||||
};
|
||||
|
||||
// cant put multiple styles in xaml for some reason
|
||||
DestroyButton.StyleClasses.Add(StyleBase.ButtonCaution);
|
||||
DestroyButton.StyleClasses.Add(StyleClass.Negative);
|
||||
}
|
||||
|
||||
public void SetEntity(EntityUid uid)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Content.Client.RoundEnd
|
||||
roundEndTabs.AddChild(MakeRoundEndSummaryTab(gm, roundEnd, roundTimeSpan, roundId));
|
||||
roundEndTabs.AddChild(MakePlayerManifestTab(info));
|
||||
|
||||
Contents.AddChild(roundEndTabs);
|
||||
ContentsContainer.AddChild(roundEndTabs);
|
||||
|
||||
OpenCenteredRight();
|
||||
MoveToFront();
|
||||
|
||||
@@ -74,12 +74,12 @@ public sealed partial class OfferingWindowOption : PanelContainer
|
||||
|
||||
if (_claimed)
|
||||
{
|
||||
ClaimButton.AddStyleClass(StyleBase.ButtonCaution);
|
||||
ClaimButton.AddStyleClass(StyleClass.Negative);
|
||||
ClaimButton.Text = Loc.GetString("offering-window-claimed");
|
||||
}
|
||||
else
|
||||
{
|
||||
ClaimButton.RemoveStyleClass(StyleBase.ButtonCaution);
|
||||
ClaimButton.RemoveStyleClass(StyleClass.Negative);
|
||||
ClaimButton.Text = Loc.GetString("offering-window-claim");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,9 +90,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
|
||||
offering.AddContent(new Label
|
||||
{
|
||||
Text = difficultyProto.RecommendedPlayers.ToString(),
|
||||
FontColorOverride = StyleNano.NanoGold,
|
||||
HorizontalAlignment = Control.HAlignment.Left,
|
||||
Margin = new Thickness(0f, 0f, 0f, 5f),
|
||||
StyleClasses = { StyleClass.LabelKeyText },
|
||||
});
|
||||
|
||||
// Details
|
||||
@@ -108,9 +108,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
|
||||
Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description))
|
||||
? LogAndReturnDefaultFactionDescription(faction)
|
||||
: Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description),
|
||||
FontColorOverride = StyleNano.NanoGold,
|
||||
HorizontalAlignment = Control.HAlignment.Left,
|
||||
Margin = new Thickness(0f, 0f, 0f, 5f),
|
||||
StyleClasses = { StyleClass.LabelKeyText },
|
||||
});
|
||||
|
||||
string LogAndReturnDefaultFactionDescription(string faction)
|
||||
@@ -129,9 +129,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
|
||||
offering.AddContent(new Label
|
||||
{
|
||||
Text = mission.Duration.ToString(),
|
||||
FontColorOverride = StyleNano.NanoGold,
|
||||
HorizontalAlignment = Control.HAlignment.Left,
|
||||
Margin = new Thickness(0f, 0f, 0f, 5f),
|
||||
StyleClasses = { StyleClass.LabelKeyText },
|
||||
});
|
||||
|
||||
// Biome
|
||||
@@ -147,9 +147,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
|
||||
Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description))
|
||||
? LogAndReturnDefaultBiomDescription(biome)
|
||||
: Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description),
|
||||
FontColorOverride = StyleNano.NanoGold,
|
||||
HorizontalAlignment = Control.HAlignment.Left,
|
||||
Margin = new Thickness(0f, 0f, 0f, 5f),
|
||||
StyleClasses = { StyleClass.LabelKeyText },
|
||||
});
|
||||
|
||||
string LogAndReturnDefaultBiomDescription(string biome)
|
||||
@@ -169,9 +169,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
|
||||
offering.AddContent(new Label
|
||||
{
|
||||
Text = string.Join("\n", mods.Select(o => "- " + o)).TrimEnd(),
|
||||
FontColorOverride = StyleNano.NanoGold,
|
||||
HorizontalAlignment = Control.HAlignment.Left,
|
||||
Margin = new Thickness(0f, 0f, 0f, 5f),
|
||||
StyleClasses = { StyleClass.LabelKeyText },
|
||||
});
|
||||
|
||||
offering.ClaimPressed += args =>
|
||||
|
||||
@@ -133,13 +133,13 @@ public sealed partial class SensorMonitoringWindow : FancyWindow, IComputerWindo
|
||||
|
||||
foreach (var sensor in _sensorData.Values)
|
||||
{
|
||||
var labelName = new Label { Text = sensor.Name, StyleClasses = { StyleBase.StyleClassLabelHeading } };
|
||||
var labelName = new Label { Text = sensor.Name, StyleClasses = { StyleClass.LabelHeading } };
|
||||
var labelAddress = new Label
|
||||
{
|
||||
Text = sensor.Address,
|
||||
Margin = new Thickness(4, 0),
|
||||
VerticalAlignment = VAlignment.Bottom,
|
||||
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
|
||||
StyleClasses = { StyleClass.LabelWeak }
|
||||
};
|
||||
|
||||
Asdf.AddChild(new BoxContainer
|
||||
@@ -163,13 +163,13 @@ public sealed partial class SensorMonitoringWindow : FancyWindow, IComputerWindo
|
||||
Orientation = BoxContainer.LayoutOrientation.Horizontal,
|
||||
Children =
|
||||
{
|
||||
new Label { Text = stream.Name, StyleClasses = { "monospace" }, HorizontalExpand = true },
|
||||
new Label { Text = stream.Name, StyleClasses = { "Monospace" }, HorizontalExpand = true },
|
||||
new Label { Text = FormatValue(stream.Unit, lastSample.Value) }
|
||||
}
|
||||
});
|
||||
|
||||
Asdf.AddChild(new GraphView(stream.Samples, startTime, curTime, maxValue * 1.1f, this) { MinHeight = 150 });
|
||||
Asdf.AddChild(new PanelContainer { StyleClasses = { StyleBase.ClassLowDivider } });
|
||||
Asdf.AddChild(new PanelContainer { StyleClasses = { StyleClass.LowDivider } });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
MinSize="200 200">
|
||||
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
|
||||
<GridContainer Margin="4 0 0 0" Columns="2">
|
||||
<Label Name="ShowIFFLabel" Text="{Loc 'iff-console-show-iff-label'}" HorizontalExpand="True" StyleClasses="StatusFieldTitle" />
|
||||
<Label Name="ShowIFFLabel" Text="{Loc 'iff-console-show-iff-label'}" HorizontalExpand="True" StyleClasses="highlight" />
|
||||
<BoxContainer Orientation="Horizontal" MinWidth="120">
|
||||
<Button Name="ShowIFFOnButton" Text="{Loc 'iff-console-on'}" StyleClasses="OpenRight" />
|
||||
<Button Name="ShowIFFOffButton" Text="{Loc 'iff-console-off'}" StyleClasses="OpenLeft" />
|
||||
</BoxContainer>
|
||||
|
||||
<Label Name="ShowVesselLabel" Text="{Loc 'iff-console-show-vessel-label'}" HorizontalExpand="True" StyleClasses="StatusFieldTitle" />
|
||||
<Label Name="ShowVesselLabel" Text="{Loc 'iff-console-show-vessel-label'}" HorizontalExpand="True" StyleClasses="highlight" />
|
||||
<BoxContainer Orientation="Horizontal" MinWidth="120">
|
||||
<Button Name="ShowVesselOnButton" Text="{Loc 'iff-console-on'}" StyleClasses="OpenRight" />
|
||||
<Button Name="ShowVesselOffButton" Text="{Loc 'iff-console-off'}" StyleClasses="OpenLeft" />
|
||||
|
||||
@@ -102,14 +102,14 @@ public sealed partial class BorgMenu : FancyWindow
|
||||
BrainView.Visible = true;
|
||||
BrainView.SetEntity(brain);
|
||||
BrainButton.Disabled = false;
|
||||
BrainButton.AddStyleClass(StyleBase.ButtonOpenLeft);
|
||||
BrainButton.AddStyleClass(StyleClass.ButtonOpenLeft);
|
||||
}
|
||||
else
|
||||
{
|
||||
BrainButton.Text = Loc.GetString("borg-ui-no-brain");
|
||||
BrainButton.Disabled = true;
|
||||
BrainView.Visible = false;
|
||||
BrainButton.RemoveStyleClass(StyleBase.ButtonOpenLeft);
|
||||
BrainButton.RemoveStyleClass(StyleClass.ButtonOpenLeft);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<PanelContainer xmlns="https://spacestation14.io"
|
||||
HorizontalExpand="True"
|
||||
StyleClasses="PanelBackgroundLight"
|
||||
StyleClasses="PanelLight"
|
||||
Margin="5 5 5 0">
|
||||
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" Margin="5 5 0 5">
|
||||
<SpriteView Name="ModuleView" Margin="0 0 5 0"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<customControls:HSeparator Margin="0 5 0 5"/>
|
||||
<RichTextLabel Name="LawLabel"/>
|
||||
<BoxContainer Name="LawAnnouncementButtons" Orientation="Horizontal" HorizontalExpand="True" Margin="0 5 0 0">
|
||||
<Label Text="{Loc laws-ui-state-law}" StyleClasses="StatusFieldTitle"/>
|
||||
<Label Text="{Loc laws-ui-state-law}" StyleClasses="highlight"/>
|
||||
<Control Margin="5 0 0 0" />
|
||||
<!-- Buttons are added via C# code-->
|
||||
</BoxContainer>
|
||||
|
||||
@@ -97,7 +97,7 @@ public sealed class SprayPainterSystem : SharedSprayPainterSystem
|
||||
public StatusControl(Entity<SprayPainterComponent> ent)
|
||||
{
|
||||
_entity = ent;
|
||||
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
|
||||
AddChild(_label);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public sealed class StackStatusControl : Control
|
||||
public StackStatusControl(StackComponent parent)
|
||||
{
|
||||
_parent = parent;
|
||||
_label = new RichTextLabel {StyleClasses = {StyleNano.StyleClassItemStatus}};
|
||||
_label = new RichTextLabel {StyleClasses = {StyleClass.ItemStatus}};
|
||||
_label.SetMarkup(Loc.GetString("comp-stack-status", ("count", _parent.Count)));
|
||||
AddChild(_label);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user