2021-02-25 19:42:16 -06:00
|
|
|
using System.Linq;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Client.Actions.UI;
|
2021-10-28 18:21:19 +13:00
|
|
|
using Content.Client.ContextMenu.UI;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Client.Examine;
|
|
|
|
|
using Content.Client.HUD.UI;
|
|
|
|
|
using Content.Client.Resources;
|
|
|
|
|
using Content.Client.Targeting;
|
2021-08-12 10:05:02 -07:00
|
|
|
using Content.Client.UserInterface.Controls;
|
2021-10-28 18:21:19 +13:00
|
|
|
using Content.Client.Verbs.UI;
|
2022-02-10 15:30:59 +13:00
|
|
|
using Content.Shared.Verbs;
|
2021-01-08 20:40:07 -08:00
|
|
|
using Robust.Client.Graphics;
|
2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Client.ResourceManagement;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Client.UserInterface;
|
|
|
|
|
using Robust.Client.UserInterface.Controls;
|
|
|
|
|
using Robust.Client.UserInterface.CustomControls;
|
|
|
|
|
using Robust.Shared.Maths;
|
2020-07-17 12:06:52 +02:00
|
|
|
using static Robust.Client.UserInterface.StylesheetHelpers;
|
2019-02-18 09:16:06 +01:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Client.Stylesheets
|
2019-02-18 09:16:06 +01:00
|
|
|
{
|
2021-11-04 03:32:03 +00:00
|
|
|
public static class ResCacheExtension
|
|
|
|
|
{
|
2022-01-21 01:38:35 -08:00
|
|
|
public static Font NotoStack(this IResourceCache resCache, string variation = "Regular", int size = 10, bool display = false)
|
2021-11-04 03:32:03 +00:00
|
|
|
{
|
|
|
|
|
var ds = display ? "Display" : "";
|
|
|
|
|
var sv = variation.StartsWith("Bold") ? "Bold" : "Regular";
|
|
|
|
|
return resCache.GetFont
|
|
|
|
|
(
|
|
|
|
|
// Ew, but ok
|
|
|
|
|
new []
|
|
|
|
|
{
|
|
|
|
|
$"/Fonts/NotoSans{ds}/NotoSans{ds}-{variation}.ttf",
|
|
|
|
|
$"/Fonts/NotoSans/NotoSansSymbols-{sv}.ttf",
|
|
|
|
|
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
|
|
|
|
|
},
|
|
|
|
|
size
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2020-04-04 15:10:51 +02:00
|
|
|
public sealed class StyleNano : StyleBase
|
2019-02-18 09:16:06 +01:00
|
|
|
{
|
2020-11-09 20:22:19 -08:00
|
|
|
public const string StyleClassBorderedWindowPanel = "BorderedWindowPanel";
|
2021-01-20 00:32:44 -08:00
|
|
|
public const string StyleClassInventorySlotBackground = "InventorySlotBackground";
|
|
|
|
|
public const string StyleClassHandSlotHighlight = "HandSlotHighlight";
|
2021-04-20 18:39:39 -05:00
|
|
|
public const string StyleClassChatSubPanel = "ChatSubPanel";
|
2020-11-09 20:22:19 -08:00
|
|
|
public const string StyleClassTransparentBorderedWindowPanel = "TransparentBorderedWindowPanel";
|
2020-12-13 14:28:20 -08:00
|
|
|
public const string StyleClassHotbarPanel = "HotbarPanel";
|
2020-11-09 20:22:19 -08:00
|
|
|
public const string StyleClassTooltipPanel = "tooltipBox";
|
|
|
|
|
public const string StyleClassTooltipAlertTitle = "tooltipAlertTitle";
|
|
|
|
|
public const string StyleClassTooltipAlertDescription = "tooltipAlertDesc";
|
|
|
|
|
public const string StyleClassTooltipAlertCooldown = "tooltipAlertCooldown";
|
2020-12-13 14:28:20 -08:00
|
|
|
public const string StyleClassTooltipActionTitle = "tooltipActionTitle";
|
|
|
|
|
public const string StyleClassTooltipActionDescription = "tooltipActionDesc";
|
|
|
|
|
public const string StyleClassTooltipActionCooldown = "tooltipActionCooldown";
|
|
|
|
|
public const string StyleClassTooltipActionRequirements = "tooltipActionCooldown";
|
|
|
|
|
public const string StyleClassHotbarSlotNumber = "hotbarSlotNumber";
|
|
|
|
|
public const string StyleClassActionSearchBox = "actionSearchBox";
|
|
|
|
|
public const string StyleClassActionMenuItemRevoked = "actionMenuItemRevoked";
|
2021-04-20 18:39:39 -05:00
|
|
|
public const string StyleClassChatLineEdit = "chatLineEdit";
|
|
|
|
|
public const string StyleClassChatChannelSelectorButton = "chatSelectorOptionButton";
|
|
|
|
|
public const string StyleClassChatFilterOptionButton = "chatFilterOptionButton";
|
2021-08-12 10:05:02 -07:00
|
|
|
public const string StyleClassStorageButton = "storageButton";
|
2020-12-13 14:28:20 -08:00
|
|
|
|
2020-01-15 14:27:47 +01:00
|
|
|
public const string StyleClassSliderRed = "Red";
|
|
|
|
|
public const string StyleClassSliderGreen = "Green";
|
|
|
|
|
public const string StyleClassSliderBlue = "Blue";
|
2022-02-08 13:54:41 -07:00
|
|
|
public const string StyleClassSliderWhite = "White";
|
2020-01-15 14:27:47 +01:00
|
|
|
|
2019-10-18 14:28:24 +02:00
|
|
|
public const string StyleClassLabelHeadingBigger = "LabelHeadingBigger";
|
2019-11-21 16:37:15 -08:00
|
|
|
public const string StyleClassLabelKeyText = "LabelKeyText";
|
Reagent dispensers (#360)
* Expose more private values of Solution and SolutionComponent
Expose SolutionComponent.ContainedSolution and Solution.Contents. Both needed by ReagentDispenserComponent.
* Implement IExamine for SolutionComponent
Allows players to see the contents of a solution by examining the entity which contains it.
* Implement ReagentDispenserComponent
Adds ReagentDispenserComponent. A component which can add or remove reagents from a solution container. It's written in a general way so that it can be used for things such as the Chemical dispensers in chemistry, but also the booze and soda dispensers in the bar.
The chemicals it may dispense are defined in yaml, similar to the way that vending machines define which entities they can dispense, by defining a reagent pack.
* Add chemical dispenser and equipment
Adds the chemical dispenser, beaker, large beaker, dropper, and a few more chemicals.
* Add booze and soda dispensers.
Adds the booze and soda dispensers, and a few chemicals for them to dispense. There's no drink mixing or drunkenness yet.
* Update engine submodule.
* Remove unneeded and commented out code
Had a few WIP notes and debug code bits I forgot to remove beforehand.
* Make SolutionComponent._containedSolution and it's values private again
- Remove `SolutionComponent.ContainedSolution` property, replace with specific access functions to maintain safety.
- Make Solution.Contents return a `ReadOnlyCollection` instead of `_contents` to prevent uncontrolled access to the Solution values.
- Add `SolutionComponent.RemoveAllSolution()`
* Update Content.Shared/Chemistry/Solution.cs
Commits a suggestion from RemieRichards to match the coding style of the rest of the codebase. Using `IReadOnlyList` instead of `IReadOnlyCollection`.
Co-Authored-By: Remie Richards <remierichards@gmail.com>
* Update Content.Shared/GameObjects/Components/Chemistry/SolutionComponent.cs
Commits a suggestion from RemieRichards to match the coding style of the rest of the codebase. Using `IReadOnlyList` instead of `IReadOnlyCollection`.
Co-Authored-By: Remie Richards <remierichards@gmail.com>
* Add import for IReadOnlyList to Shared/SolutionComponent.cs
* Add documentation
* Improve localization
Improve use of ILocalizationManager.
* Resolve ReagentDispenserWindow._localizationManager before using it
Forgot to do this in the last commit, resulting in a crash. Oops.
* Add SolutionCaps.FitsInDispenser. Use in ReagentDispenserComponent.
Used to limit large containers like buckets or mop buckets from being placed in a dispenser. Both have large capacities (500) and weren't designed to hold certain chemicals like a beaker is, so for now they can be blocked from being put in a dispenser by giving them that flag.
* Add colors to new reagents
* Update engine submodule
2019-10-05 09:10:05 -04:00
|
|
|
public const string StyleClassLabelSecondaryColor = "LabelSecondaryColor";
|
2019-10-18 14:28:24 +02:00
|
|
|
public const string StyleClassLabelBig = "LabelBig";
|
2019-05-14 09:57:51 +02:00
|
|
|
public const string StyleClassButtonBig = "ButtonBig";
|
2020-05-02 23:20:12 +02:00
|
|
|
public const string StyleClassPopupMessage = "PopupMessage";
|
2020-04-04 15:10:51 +02:00
|
|
|
|
2019-10-18 14:28:24 +02:00
|
|
|
public static readonly Color NanoGold = Color.FromHex("#A88B5E");
|
2021-11-02 01:12:55 +01:00
|
|
|
public static readonly Color GoodGreenFore = Color.FromHex("#31843E");
|
|
|
|
|
public static readonly Color ConcerningOrangeFore = Color.FromHex("#A5762F");
|
|
|
|
|
public static readonly Color DangerousRedFore = Color.FromHex("#BB3232");
|
|
|
|
|
public static readonly Color DisabledFore = Color.FromHex("#5A5A5A");
|
2020-04-04 15:10:51 +02:00
|
|
|
|
2019-10-22 23:16:12 +02:00
|
|
|
public static readonly Color ButtonColorDefault = Color.FromHex("#464966");
|
2021-01-08 20:40:07 -08:00
|
|
|
public static readonly Color ButtonColorDefaultRed = Color.FromHex("#D43B3B");
|
2019-10-22 23:16:12 +02:00
|
|
|
public static readonly Color ButtonColorHovered = Color.FromHex("#575b7f");
|
2021-01-08 20:40:07 -08:00
|
|
|
public static readonly Color ButtonColorHoveredRed = Color.FromHex("#DF6B6B");
|
2019-10-22 23:16:12 +02:00
|
|
|
public static readonly Color ButtonColorPressed = Color.FromHex("#3e6c45");
|
|
|
|
|
public static readonly Color ButtonColorDisabled = Color.FromHex("#30313c");
|
2019-02-18 09:16:06 +01:00
|
|
|
|
2020-09-07 12:20:08 +02:00
|
|
|
public static readonly Color ButtonColorCautionDefault = Color.FromHex("#ab3232");
|
|
|
|
|
public static readonly Color ButtonColorCautionHovered = Color.FromHex("#cf2f2f");
|
2020-09-07 10:52:54 +02:00
|
|
|
public static readonly Color ButtonColorCautionPressed = Color.FromHex("#3e6c45");
|
2020-09-07 12:20:08 +02:00
|
|
|
public static readonly Color ButtonColorCautionDisabled = Color.FromHex("#602a2a");
|
2020-09-07 10:52:54 +02:00
|
|
|
|
2021-10-28 18:21:19 +13:00
|
|
|
// Context menu button colors
|
|
|
|
|
public static readonly Color ButtonColorContext = Color.FromHex("#1119");
|
|
|
|
|
public static readonly Color ButtonColorContextHover = Color.DarkSlateGray;
|
|
|
|
|
public static readonly Color ButtonColorContextPressed = Color.LightSlateGray;
|
|
|
|
|
public static readonly Color ButtonColorContextDisabled = Color.Black;
|
|
|
|
|
|
2022-02-13 20:20:58 -07:00
|
|
|
// Examine button colors
|
|
|
|
|
public static readonly Color ExamineButtonColorContext = Color.Transparent;
|
|
|
|
|
public static readonly Color ExamineButtonColorContextHover = Color.DarkSlateGray;
|
|
|
|
|
public static readonly Color ExamineButtonColorContextPressed = Color.LightSlateGray;
|
|
|
|
|
public static readonly Color ExamineButtonColorContextDisabled = Color.FromHex("#5A5A5A");
|
|
|
|
|
|
2019-05-29 12:07:05 -04:00
|
|
|
//Used by the APC and SMES menus
|
|
|
|
|
public const string StyleClassPowerStateNone = "PowerStateNone";
|
|
|
|
|
public const string StyleClassPowerStateLow = "PowerStateLow";
|
|
|
|
|
public const string StyleClassPowerStateGood = "PowerStateGood";
|
|
|
|
|
|
2020-01-09 00:27:52 +01:00
|
|
|
public const string StyleClassItemStatus = "ItemStatus";
|
|
|
|
|
|
2020-04-04 15:10:51 +02:00
|
|
|
public override Stylesheet Stylesheet { get; }
|
2019-02-18 09:16:06 +01:00
|
|
|
|
2020-04-04 15:10:51 +02:00
|
|
|
public StyleNano(IResourceCache resCache) : base(resCache)
|
2019-02-18 09:16:06 +01:00
|
|
|
{
|
2022-01-21 01:38:35 -08:00
|
|
|
var notoSans10 = resCache.NotoStack(size: 10);
|
|
|
|
|
var notoSansItalic10 = resCache.NotoStack(variation: "Italic", size: 10);
|
|
|
|
|
var notoSans12 = resCache.NotoStack(size: 12);
|
|
|
|
|
var notoSansItalic12 = resCache.NotoStack(variation: "Italic", size: 12);
|
|
|
|
|
var notoSansBold12 = resCache.NotoStack(variation: "Bold", size: 12);
|
|
|
|
|
var notoSansBoldItalic12 = resCache.NotoStack(variation: "BoldItalic", size: 12);
|
|
|
|
|
var notoSansDisplayBold14 = resCache.NotoStack(variation: "Bold", display: true, size: 14);
|
|
|
|
|
var notoSansDisplayBold16 = resCache.NotoStack(variation: "Bold", display: true, size: 16);
|
|
|
|
|
var notoSans15 = resCache.NotoStack(variation: "Regular", size: 15);
|
|
|
|
|
var notoSans16 = resCache.NotoStack(variation: "Regular", size: 16);
|
|
|
|
|
var notoSansBold16 = resCache.NotoStack(variation: "Bold", size: 16);
|
|
|
|
|
var notoSansBold18 = resCache.NotoStack(variation: "Bold", size: 18);
|
|
|
|
|
var notoSansBold20 = resCache.NotoStack(variation: "Bold", size: 20);
|
2020-07-07 13:19:00 -04:00
|
|
|
var windowHeaderTex = resCache.GetTexture("/Textures/Interface/Nano/window_header.png");
|
2019-02-18 09:16:06 +01:00
|
|
|
var windowHeader = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = windowHeaderTex,
|
|
|
|
|
PatchMarginBottom = 3,
|
|
|
|
|
ExpandMarginBottom = 3,
|
2019-12-05 16:00:03 +01:00
|
|
|
ContentMarginBottomOverride = 0
|
2019-02-18 09:16:06 +01:00
|
|
|
};
|
2021-11-15 12:42:30 +01:00
|
|
|
var windowHeaderAlertTex = resCache.GetTexture("/Textures/Interface/Nano/window_header_alert.png");
|
|
|
|
|
var windowHeaderAlert = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = windowHeaderAlertTex,
|
|
|
|
|
PatchMarginBottom = 3,
|
|
|
|
|
ExpandMarginBottom = 3,
|
|
|
|
|
ContentMarginBottomOverride = 0
|
|
|
|
|
};
|
2020-07-07 13:19:00 -04:00
|
|
|
var windowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/window_background.png");
|
2019-02-21 18:13:37 +01:00
|
|
|
var windowBackground = new StyleBoxTexture
|
|
|
|
|
{
|
2019-03-05 09:39:12 +01:00
|
|
|
Texture = windowBackgroundTex,
|
2019-02-21 18:13:37 +01:00
|
|
|
};
|
2019-02-21 22:01:13 +01:00
|
|
|
windowBackground.SetPatchMargin(StyleBox.Margin.Horizontal | StyleBox.Margin.Bottom, 2);
|
2019-02-21 18:13:37 +01:00
|
|
|
windowBackground.SetExpandMargin(StyleBox.Margin.Horizontal | StyleBox.Margin.Bottom, 2);
|
|
|
|
|
|
2020-11-09 20:22:19 -08:00
|
|
|
var borderedWindowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/window_background_bordered.png");
|
|
|
|
|
var borderedWindowBackground = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = borderedWindowBackgroundTex,
|
|
|
|
|
};
|
|
|
|
|
borderedWindowBackground.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
|
2021-10-28 18:21:19 +13:00
|
|
|
var contextMenuBackground = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = borderedWindowBackgroundTex,
|
|
|
|
|
};
|
|
|
|
|
contextMenuBackground.SetPatchMargin(StyleBox.Margin.All, ContextMenuElement.ElementMargin);
|
|
|
|
|
|
2021-01-20 00:32:44 -08:00
|
|
|
var invSlotBgTex = resCache.GetTexture("/Textures/Interface/Inventory/inv_slot_background.png");
|
|
|
|
|
var invSlotBg = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = invSlotBgTex,
|
|
|
|
|
};
|
|
|
|
|
invSlotBg.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
invSlotBg.SetContentMarginOverride(StyleBox.Margin.All, 0);
|
|
|
|
|
|
|
|
|
|
var handSlotHighlightTex = resCache.GetTexture("/Textures/Interface/Inventory/hand_slot_highlight.png");
|
|
|
|
|
var handSlotHighlight = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = handSlotHighlightTex,
|
|
|
|
|
};
|
|
|
|
|
handSlotHighlight.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
|
2020-11-09 20:22:19 -08:00
|
|
|
var borderedTransparentWindowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/transparent_window_background_bordered.png");
|
|
|
|
|
var borderedTransparentWindowBackground = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = borderedTransparentWindowBackgroundTex,
|
|
|
|
|
};
|
|
|
|
|
borderedTransparentWindowBackground.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
|
2020-12-13 14:28:20 -08:00
|
|
|
var hotbarBackground = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = borderedWindowBackgroundTex,
|
|
|
|
|
};
|
|
|
|
|
hotbarBackground.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
hotbarBackground.SetExpandMargin(StyleBox.Margin.All, 4);
|
|
|
|
|
|
2021-08-12 10:05:02 -07:00
|
|
|
var buttonStorage = new StyleBoxTexture(BaseButton);
|
|
|
|
|
buttonStorage.SetPatchMargin(StyleBox.Margin.All, 10);
|
|
|
|
|
buttonStorage.SetPadding(StyleBox.Margin.All, 0);
|
|
|
|
|
buttonStorage.SetContentMarginOverride(StyleBox.Margin.Vertical, 0);
|
|
|
|
|
buttonStorage.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
|
|
|
|
|
|
2021-10-28 18:21:19 +13:00
|
|
|
var buttonContext = new StyleBoxTexture { Texture = Texture.White };
|
|
|
|
|
|
2020-12-13 14:28:20 -08:00
|
|
|
var buttonRectTex = resCache.GetTexture("/Textures/Interface/Nano/light_panel_background_bordered.png");
|
|
|
|
|
var buttonRect = new StyleBoxTexture(BaseButton)
|
|
|
|
|
{
|
|
|
|
|
Texture = buttonRectTex
|
|
|
|
|
};
|
|
|
|
|
buttonRect.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
buttonRect.SetPadding(StyleBox.Margin.All, 2);
|
|
|
|
|
buttonRect.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
|
|
|
|
buttonRect.SetContentMarginOverride(StyleBox.Margin.Horizontal, 2);
|
|
|
|
|
|
|
|
|
|
var buttonRectHover = new StyleBoxTexture(buttonRect)
|
|
|
|
|
{
|
|
|
|
|
Modulate = ButtonColorHovered
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var buttonRectPressed = new StyleBoxTexture(buttonRect)
|
|
|
|
|
{
|
|
|
|
|
Modulate = ButtonColorPressed
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var buttonRectDisabled = new StyleBoxTexture(buttonRect)
|
|
|
|
|
{
|
|
|
|
|
Modulate = ButtonColorDisabled
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var buttonRectActionMenuItemTex = resCache.GetTexture("/Textures/Interface/Nano/black_panel_light_thin_border.png");
|
|
|
|
|
var buttonRectActionMenuRevokedItemTex = resCache.GetTexture("/Textures/Interface/Nano/black_panel_red_thin_border.png");
|
|
|
|
|
var buttonRectActionMenuItem = new StyleBoxTexture(BaseButton)
|
|
|
|
|
{
|
|
|
|
|
Texture = buttonRectActionMenuItemTex
|
|
|
|
|
};
|
|
|
|
|
buttonRectActionMenuItem.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
buttonRectActionMenuItem.SetPadding(StyleBox.Margin.All, 2);
|
|
|
|
|
buttonRectActionMenuItem.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
|
|
|
|
buttonRectActionMenuItem.SetContentMarginOverride(StyleBox.Margin.Horizontal, 2);
|
|
|
|
|
var buttonRectActionMenuItemRevoked = new StyleBoxTexture(buttonRectActionMenuItem)
|
|
|
|
|
{
|
|
|
|
|
Texture = buttonRectActionMenuRevokedItemTex
|
|
|
|
|
};
|
|
|
|
|
var buttonRectActionMenuItemHover = new StyleBoxTexture(buttonRectActionMenuItem)
|
|
|
|
|
{
|
|
|
|
|
Modulate = ButtonColorHovered
|
|
|
|
|
};
|
|
|
|
|
var buttonRectActionMenuItemPressed = new StyleBoxTexture(buttonRectActionMenuItem)
|
|
|
|
|
{
|
|
|
|
|
Modulate = ButtonColorPressed
|
|
|
|
|
};
|
|
|
|
|
|
2021-01-08 20:40:07 -08:00
|
|
|
var buttonTex = resCache.GetTexture("/Textures/Interface/Nano/button.svg.96dpi.png");
|
|
|
|
|
var topButtonBase = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = buttonTex,
|
|
|
|
|
};
|
|
|
|
|
topButtonBase.SetPatchMargin(StyleBox.Margin.All, 10);
|
|
|
|
|
topButtonBase.SetPadding(StyleBox.Margin.All, 0);
|
|
|
|
|
topButtonBase.SetContentMarginOverride(StyleBox.Margin.All, 0);
|
|
|
|
|
|
|
|
|
|
var topButtonOpenRight = new StyleBoxTexture(topButtonBase)
|
|
|
|
|
{
|
|
|
|
|
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions((0, 0), (14, 24))),
|
|
|
|
|
};
|
|
|
|
|
topButtonOpenRight.SetPatchMargin(StyleBox.Margin.Right, 0);
|
|
|
|
|
|
|
|
|
|
var topButtonOpenLeft = new StyleBoxTexture(topButtonBase)
|
|
|
|
|
{
|
|
|
|
|
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions((10, 0), (14, 24))),
|
|
|
|
|
};
|
|
|
|
|
topButtonOpenLeft.SetPatchMargin(StyleBox.Margin.Left, 0);
|
|
|
|
|
|
|
|
|
|
var topButtonSquare = new StyleBoxTexture(topButtonBase)
|
|
|
|
|
{
|
|
|
|
|
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions((10, 0), (3, 24))),
|
|
|
|
|
};
|
|
|
|
|
topButtonSquare.SetPatchMargin(StyleBox.Margin.Horizontal, 0);
|
|
|
|
|
|
2021-04-20 18:39:39 -05:00
|
|
|
var chatChannelButtonTex = resCache.GetTexture("/Textures/Interface/Nano/rounded_button.svg.96dpi.png");
|
|
|
|
|
var chatChannelButton = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = chatChannelButtonTex,
|
|
|
|
|
};
|
|
|
|
|
chatChannelButton.SetPatchMargin(StyleBox.Margin.All, 5);
|
|
|
|
|
chatChannelButton.SetPadding(StyleBox.Margin.All, 2);
|
|
|
|
|
|
|
|
|
|
var chatFilterButtonTex = resCache.GetTexture("/Textures/Interface/Nano/rounded_button_bordered.svg.96dpi.png");
|
|
|
|
|
var chatFilterButton = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = chatFilterButtonTex,
|
|
|
|
|
};
|
|
|
|
|
chatFilterButton.SetPatchMargin(StyleBox.Margin.All, 5);
|
|
|
|
|
chatFilterButton.SetPadding(StyleBox.Margin.All, 2);
|
|
|
|
|
|
2020-07-07 13:19:00 -04:00
|
|
|
var textureInvertedTriangle = resCache.GetTexture("/Textures/Interface/Nano/inverted_triangle.svg.png");
|
2020-02-13 00:47:46 -08:00
|
|
|
|
2020-07-07 13:19:00 -04:00
|
|
|
var lineEditTex = resCache.GetTexture("/Textures/Interface/Nano/lineedit.png");
|
2019-02-23 16:35:51 +01:00
|
|
|
var lineEdit = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = lineEditTex,
|
|
|
|
|
};
|
|
|
|
|
lineEdit.SetPatchMargin(StyleBox.Margin.All, 3);
|
|
|
|
|
lineEdit.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
|
2019-02-18 09:16:06 +01:00
|
|
|
|
2021-04-20 18:39:39 -05:00
|
|
|
var chatSubBGTex = resCache.GetTexture("/Textures/Interface/Nano/chat_sub_background.png");
|
|
|
|
|
var chatSubBG = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = chatSubBGTex,
|
|
|
|
|
};
|
|
|
|
|
chatSubBG.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
|
2020-12-13 14:28:20 -08:00
|
|
|
var actionSearchBoxTex = resCache.GetTexture("/Textures/Interface/Nano/black_panel_dark_thin_border.png");
|
|
|
|
|
var actionSearchBox = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = actionSearchBoxTex,
|
|
|
|
|
};
|
|
|
|
|
actionSearchBox.SetPatchMargin(StyleBox.Margin.All, 3);
|
|
|
|
|
actionSearchBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
|
|
|
|
|
|
2020-07-07 13:19:00 -04:00
|
|
|
var tabContainerPanelTex = resCache.GetTexture("/Textures/Interface/Nano/tabcontainer_panel.png");
|
2019-03-05 09:39:12 +01:00
|
|
|
var tabContainerPanel = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = tabContainerPanelTex,
|
|
|
|
|
};
|
|
|
|
|
tabContainerPanel.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
|
|
|
|
|
var tabContainerBoxActive = new StyleBoxFlat {BackgroundColor = new Color(64, 64, 64)};
|
2019-08-30 09:39:22 +02:00
|
|
|
tabContainerBoxActive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
|
2019-03-05 09:39:12 +01:00
|
|
|
var tabContainerBoxInactive = new StyleBoxFlat {BackgroundColor = new Color(32, 32, 32)};
|
2019-08-30 09:39:22 +02:00
|
|
|
tabContainerBoxInactive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
|
2019-03-05 09:39:12 +01:00
|
|
|
|
2019-03-11 09:07:56 +01:00
|
|
|
var progressBarBackground = new StyleBoxFlat
|
|
|
|
|
{
|
|
|
|
|
BackgroundColor = new Color(0.25f, 0.25f, 0.25f)
|
|
|
|
|
};
|
|
|
|
|
progressBarBackground.SetContentMarginOverride(StyleBox.Margin.Vertical, 5);
|
|
|
|
|
|
|
|
|
|
var progressBarForeground = new StyleBoxFlat
|
|
|
|
|
{
|
|
|
|
|
BackgroundColor = new Color(0.25f, 0.50f, 0.25f)
|
|
|
|
|
};
|
|
|
|
|
progressBarForeground.SetContentMarginOverride(StyleBox.Margin.Vertical, 5);
|
|
|
|
|
|
2019-03-11 11:55:29 +01:00
|
|
|
// CheckBox
|
2020-07-07 13:19:00 -04:00
|
|
|
var checkBoxTextureChecked = resCache.GetTexture("/Textures/Interface/Nano/checkbox_checked.svg.96dpi.png");
|
|
|
|
|
var checkBoxTextureUnchecked = resCache.GetTexture("/Textures/Interface/Nano/checkbox_unchecked.svg.96dpi.png");
|
2019-03-11 11:55:29 +01:00
|
|
|
|
2019-04-09 17:33:53 +02:00
|
|
|
// Tooltip box
|
2020-07-07 13:19:00 -04:00
|
|
|
var tooltipTexture = resCache.GetTexture("/Textures/Interface/Nano/tooltip.png");
|
2019-04-09 17:33:53 +02:00
|
|
|
var tooltipBox = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = tooltipTexture,
|
|
|
|
|
};
|
|
|
|
|
tooltipBox.SetPatchMargin(StyleBox.Margin.All, 2);
|
2020-11-09 20:22:19 -08:00
|
|
|
tooltipBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 7);
|
2019-04-09 17:33:53 +02:00
|
|
|
|
2022-01-11 06:48:18 -08:00
|
|
|
// Whisper box
|
|
|
|
|
var whisperTexture = resCache.GetTexture("/Textures/Interface/Nano/whisper.png");
|
|
|
|
|
var whisperBox = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = whisperTexture,
|
|
|
|
|
};
|
|
|
|
|
whisperBox.SetPatchMargin(StyleBox.Margin.All, 2);
|
|
|
|
|
whisperBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 7);
|
|
|
|
|
|
2019-05-14 01:19:25 +02:00
|
|
|
// Placeholder
|
2020-07-07 13:19:00 -04:00
|
|
|
var placeholderTexture = resCache.GetTexture("/Textures/Interface/Nano/placeholder.png");
|
2019-10-15 13:12:48 +02:00
|
|
|
var placeholder = new StyleBoxTexture {Texture = placeholderTexture};
|
2019-10-18 14:28:24 +02:00
|
|
|
placeholder.SetPatchMargin(StyleBox.Margin.All, 19);
|
2019-05-14 01:19:25 +02:00
|
|
|
placeholder.SetExpandMargin(StyleBox.Margin.All, -5);
|
2019-10-18 14:28:24 +02:00
|
|
|
placeholder.Mode = StyleBoxTexture.StretchMode.Tile;
|
2019-05-14 01:19:25 +02:00
|
|
|
|
2019-05-14 12:54:47 +02:00
|
|
|
var itemListBackgroundSelected = new StyleBoxFlat {BackgroundColor = new Color(75, 75, 86)};
|
|
|
|
|
itemListBackgroundSelected.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
|
|
|
|
itemListBackgroundSelected.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
|
|
|
|
|
var itemListItemBackgroundDisabled = new StyleBoxFlat {BackgroundColor = new Color(10, 10, 12)};
|
|
|
|
|
itemListItemBackgroundDisabled.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
|
|
|
|
itemListItemBackgroundDisabled.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
|
|
|
|
|
var itemListItemBackground = new StyleBoxFlat {BackgroundColor = new Color(55, 55, 68)};
|
|
|
|
|
itemListItemBackground.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
|
|
|
|
itemListItemBackground.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
|
2020-01-09 00:27:52 +01:00
|
|
|
var itemListItemBackgroundTransparent = new StyleBoxFlat {BackgroundColor = Color.Transparent};
|
2019-11-21 16:37:15 -08:00
|
|
|
itemListItemBackgroundTransparent.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
|
|
|
|
itemListItemBackgroundTransparent.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
|
2019-05-14 12:54:47 +02:00
|
|
|
|
2019-10-18 14:28:24 +02:00
|
|
|
// NanoHeading
|
2020-07-07 13:19:00 -04:00
|
|
|
var nanoHeadingTex = resCache.GetTexture("/Textures/Interface/Nano/nanoheading.svg.96dpi.png");
|
2019-10-18 14:28:24 +02:00
|
|
|
var nanoHeadingBox = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = nanoHeadingTex,
|
|
|
|
|
PatchMarginRight = 10,
|
|
|
|
|
PatchMarginTop = 10,
|
|
|
|
|
ContentMarginTopOverride = 2,
|
|
|
|
|
ContentMarginLeftOverride = 10,
|
|
|
|
|
PaddingTop = 4
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nanoHeadingBox.SetPatchMargin(StyleBox.Margin.Left | StyleBox.Margin.Bottom, 2);
|
|
|
|
|
|
|
|
|
|
// Stripe background
|
2020-07-07 13:19:00 -04:00
|
|
|
var stripeBackTex = resCache.GetTexture("/Textures/Interface/Nano/stripeback.svg.96dpi.png");
|
2019-10-18 14:28:24 +02:00
|
|
|
var stripeBack = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = stripeBackTex,
|
|
|
|
|
Mode = StyleBoxTexture.StretchMode.Tile
|
|
|
|
|
};
|
|
|
|
|
|
2020-01-15 14:27:47 +01:00
|
|
|
// Slider
|
2020-07-07 13:19:00 -04:00
|
|
|
var sliderOutlineTex = resCache.GetTexture("/Textures/Interface/Nano/slider_outline.svg.96dpi.png");
|
|
|
|
|
var sliderFillTex = resCache.GetTexture("/Textures/Interface/Nano/slider_fill.svg.96dpi.png");
|
|
|
|
|
var sliderGrabTex = resCache.GetTexture("/Textures/Interface/Nano/slider_grabber.svg.96dpi.png");
|
2020-01-15 14:27:47 +01:00
|
|
|
|
|
|
|
|
var sliderFillBox = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = sliderFillTex,
|
|
|
|
|
Modulate = Color.FromHex("#3E6C45")
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var sliderBackBox = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = sliderFillTex,
|
|
|
|
|
Modulate = Color.FromHex("#1E1E22")
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var sliderForeBox = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = sliderOutlineTex,
|
|
|
|
|
Modulate = Color.FromHex("#494949")
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var sliderGrabBox = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = sliderGrabTex,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
sliderFillBox.SetPatchMargin(StyleBox.Margin.All, 12);
|
|
|
|
|
sliderBackBox.SetPatchMargin(StyleBox.Margin.All, 12);
|
|
|
|
|
sliderForeBox.SetPatchMargin(StyleBox.Margin.All, 12);
|
|
|
|
|
sliderGrabBox.SetPatchMargin(StyleBox.Margin.All, 12);
|
|
|
|
|
|
2021-09-20 21:50:02 -07:00
|
|
|
var sliderFillGreen = new StyleBoxTexture(sliderFillBox) {Modulate = Color.LimeGreen};
|
2020-01-15 14:27:47 +01:00
|
|
|
var sliderFillRed = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Red};
|
|
|
|
|
var sliderFillBlue = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Blue};
|
2022-02-08 13:54:41 -07:00
|
|
|
var sliderFillWhite = new StyleBoxTexture(sliderFillBox) { Modulate = Color.White };
|
2020-01-15 14:27:47 +01:00
|
|
|
|
2021-12-20 12:42:42 +01:00
|
|
|
var boxFont13 = resCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 13);
|
2021-11-02 01:12:55 +01:00
|
|
|
|
|
|
|
|
var insetBack = new StyleBoxTexture
|
|
|
|
|
{
|
|
|
|
|
Texture = buttonTex,
|
|
|
|
|
Modulate = Color.FromHex("#202023"),
|
|
|
|
|
};
|
|
|
|
|
insetBack.SetPatchMargin(StyleBox.Margin.All, 10);
|
|
|
|
|
|
2022-01-13 06:28:17 -08:00
|
|
|
var contextMenuExpansionTexture = resCache.GetTexture("/Textures/Interface/VerbIcons/group.svg.192dpi.png");
|
|
|
|
|
var verbMenuConfirmationTexture = resCache.GetTexture("/Textures/Interface/VerbIcons/group.svg.192dpi.png");
|
|
|
|
|
|
2020-04-04 15:10:51 +02:00
|
|
|
Stylesheet = new Stylesheet(BaseRules.Concat(new[]
|
2019-02-18 09:16:06 +01:00
|
|
|
{
|
|
|
|
|
// Window title.
|
|
|
|
|
new StyleRule(
|
2022-01-21 01:38:35 -08:00
|
|
|
new SelectorElement(typeof(Label), new[] {DefaultWindow.StyleClassWindowTitle}, null, null),
|
2019-02-18 09:16:06 +01:00
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Label.StylePropertyFontColor, NanoGold),
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14),
|
2019-02-18 09:16:06 +01:00
|
|
|
}),
|
2021-11-15 12:42:30 +01:00
|
|
|
// Alert (white) window title.
|
|
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(typeof(Label), new[] {"windowTitleAlert"}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Label.StylePropertyFontColor, Color.White),
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14),
|
2021-11-15 12:42:30 +01:00
|
|
|
}),
|
2019-02-18 09:16:06 +01:00
|
|
|
// Window background.
|
|
|
|
|
new StyleRule(
|
2022-01-21 01:38:35 -08:00
|
|
|
new SelectorElement(null, new[] {DefaultWindow.StyleClassWindowPanel}, null, null),
|
2019-02-18 09:16:06 +01:00
|
|
|
new[]
|
|
|
|
|
{
|
2019-12-05 16:00:03 +01:00
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, windowBackground),
|
2019-02-18 09:16:06 +01:00
|
|
|
}),
|
2020-11-09 20:22:19 -08:00
|
|
|
// bordered window background
|
|
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(null, new[] {StyleClassBorderedWindowPanel}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, borderedWindowBackground),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(null, new[] {StyleClassTransparentBorderedWindowPanel}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, borderedTransparentWindowBackground),
|
|
|
|
|
}),
|
2021-01-20 00:32:44 -08:00
|
|
|
// inventory slot background
|
|
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(null, new[] {StyleClassInventorySlotBackground}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, invSlotBg),
|
|
|
|
|
}),
|
|
|
|
|
// hand slot highlight
|
|
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(null, new[] {StyleClassHandSlotHighlight}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, handSlotHighlight),
|
|
|
|
|
}),
|
2020-12-13 14:28:20 -08:00
|
|
|
// Hotbar background
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {StyleClassHotbarPanel}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, hotbarBackground),
|
|
|
|
|
}),
|
2019-02-18 09:16:06 +01:00
|
|
|
// Window header.
|
|
|
|
|
new StyleRule(
|
2022-01-21 01:38:35 -08:00
|
|
|
new SelectorElement(typeof(PanelContainer), new[] {DefaultWindow.StyleClassWindowHeader}, null, null),
|
2019-02-18 09:16:06 +01:00
|
|
|
new[]
|
|
|
|
|
{
|
2019-12-05 16:00:03 +01:00
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, windowHeader),
|
2019-02-18 09:16:06 +01:00
|
|
|
}),
|
2021-11-15 12:42:30 +01:00
|
|
|
// Alert (red) window header.
|
|
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(typeof(PanelContainer), new[] {"windowHeaderAlert"}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, windowHeaderAlert),
|
|
|
|
|
}),
|
2019-02-18 09:16:06 +01:00
|
|
|
|
2020-09-07 10:52:54 +02:00
|
|
|
// Shapes for the buttons.
|
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
|
|
|
|
.Prop(ContainerButton.StylePropertyStyleBox, BaseButton),
|
|
|
|
|
|
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
|
|
|
|
.Class(ButtonOpenRight)
|
|
|
|
|
.Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenRight),
|
|
|
|
|
|
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
|
|
|
|
.Class(ButtonOpenLeft)
|
|
|
|
|
.Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenLeft),
|
|
|
|
|
|
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
|
|
|
|
.Class(ButtonOpenBoth)
|
|
|
|
|
.Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenBoth),
|
2019-02-18 09:16:06 +01:00
|
|
|
|
2021-01-08 20:40:07 -08:00
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
|
|
|
|
.Class(ButtonSquare)
|
|
|
|
|
.Prop(ContainerButton.StylePropertyStyleBox, BaseButtonSquare),
|
|
|
|
|
|
2020-02-14 18:05:35 -08:00
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] { Button.StyleClassButton }, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Center),
|
|
|
|
|
}),
|
|
|
|
|
|
2020-09-07 10:52:54 +02:00
|
|
|
// Colors for the buttons.
|
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
2020-07-17 12:06:52 +02:00
|
|
|
.Pseudo(ContainerButton.StylePseudoClassNormal)
|
2020-09-07 10:52:54 +02:00
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorDefault),
|
2020-07-17 12:06:52 +02:00
|
|
|
|
2020-09-07 10:52:54 +02:00
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
2020-07-17 12:06:52 +02:00
|
|
|
.Pseudo(ContainerButton.StylePseudoClassHover)
|
2020-09-07 10:52:54 +02:00
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorHovered),
|
2020-07-17 12:06:52 +02:00
|
|
|
|
2020-09-07 10:52:54 +02:00
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
2020-07-17 12:06:52 +02:00
|
|
|
.Pseudo(ContainerButton.StylePseudoClassPressed)
|
2020-09-07 10:52:54 +02:00
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorPressed),
|
2020-07-17 12:06:52 +02:00
|
|
|
|
2020-09-07 10:52:54 +02:00
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
2020-07-17 12:06:52 +02:00
|
|
|
.Pseudo(ContainerButton.StylePseudoClassDisabled)
|
2020-09-07 10:52:54 +02:00
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorDisabled),
|
2020-07-17 12:06:52 +02:00
|
|
|
|
2020-09-07 10:52:54 +02:00
|
|
|
// Colors for the caution buttons.
|
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(ButtonCaution)
|
2020-07-17 12:06:52 +02:00
|
|
|
.Pseudo(ContainerButton.StylePseudoClassNormal)
|
2020-09-07 10:52:54 +02:00
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionDefault),
|
2020-07-17 12:06:52 +02:00
|
|
|
|
2020-09-07 10:52:54 +02:00
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(ButtonCaution)
|
2020-07-17 12:06:52 +02:00
|
|
|
.Pseudo(ContainerButton.StylePseudoClassHover)
|
2020-09-07 10:52:54 +02:00
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionHovered),
|
2020-07-17 12:06:52 +02:00
|
|
|
|
2020-09-07 10:52:54 +02:00
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(ButtonCaution)
|
2020-07-17 12:06:52 +02:00
|
|
|
.Pseudo(ContainerButton.StylePseudoClassPressed)
|
2020-09-07 10:52:54 +02:00
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionPressed),
|
2020-07-17 12:06:52 +02:00
|
|
|
|
2020-09-07 10:52:54 +02:00
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(ButtonCaution)
|
2020-07-17 12:06:52 +02:00
|
|
|
.Pseudo(ContainerButton.StylePseudoClassDisabled)
|
2020-09-07 10:52:54 +02:00
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionDisabled),
|
2020-07-17 12:06:52 +02:00
|
|
|
|
2020-02-14 18:05:35 -08:00
|
|
|
new StyleRule(new SelectorChild(
|
|
|
|
|
new SelectorElement(typeof(Button), null, null, new[] {ContainerButton.StylePseudoClassDisabled}),
|
|
|
|
|
new SelectorElement(typeof(Label), null, null, null)),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty("font-color", Color.FromHex("#E5E5E581")),
|
|
|
|
|
}),
|
|
|
|
|
|
2021-10-28 18:21:19 +13:00
|
|
|
// Context Menu window
|
|
|
|
|
Element<PanelContainer>().Class(ContextMenuPopup.StyleClassContextMenuPopup)
|
|
|
|
|
.Prop(PanelContainer.StylePropertyPanel, contextMenuBackground),
|
|
|
|
|
|
|
|
|
|
// Context menu buttons
|
|
|
|
|
Element<ContextMenuElement>().Class(ContextMenuElement.StyleClassContextMenuButton)
|
|
|
|
|
.Prop(ContainerButton.StylePropertyStyleBox, buttonContext),
|
|
|
|
|
|
|
|
|
|
Element<ContextMenuElement>().Class(ContextMenuElement.StyleClassContextMenuButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassNormal)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorContext),
|
|
|
|
|
|
|
|
|
|
Element<ContextMenuElement>().Class(ContextMenuElement.StyleClassContextMenuButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassHover)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorContextHover),
|
|
|
|
|
|
|
|
|
|
Element<ContextMenuElement>().Class(ContextMenuElement.StyleClassContextMenuButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassPressed)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorContextPressed),
|
|
|
|
|
|
|
|
|
|
Element<ContextMenuElement>().Class(ContextMenuElement.StyleClassContextMenuButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassDisabled)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorContextDisabled),
|
|
|
|
|
|
|
|
|
|
// Context Menu Labels
|
2022-02-10 15:30:59 +13:00
|
|
|
Element<RichTextLabel>().Class(InteractionVerb.DefaultTextStyleClass)
|
2021-12-20 12:42:42 +01:00
|
|
|
.Prop(Label.StylePropertyFont, notoSansBoldItalic12),
|
2021-10-28 18:21:19 +13:00
|
|
|
|
2022-02-10 15:30:59 +13:00
|
|
|
Element<RichTextLabel>().Class(ActivationVerb.DefaultTextStyleClass)
|
2021-12-20 12:42:42 +01:00
|
|
|
.Prop(Label.StylePropertyFont, notoSansBold12),
|
2021-10-28 18:21:19 +13:00
|
|
|
|
2022-02-10 15:30:59 +13:00
|
|
|
Element<RichTextLabel>().Class(AlternativeVerb.DefaultTextStyleClass)
|
2021-12-20 12:42:42 +01:00
|
|
|
.Prop(Label.StylePropertyFont, notoSansItalic12),
|
2021-10-28 18:21:19 +13:00
|
|
|
|
2022-02-10 15:30:59 +13:00
|
|
|
Element<RichTextLabel>().Class(Verb.DefaultTextStyleClass)
|
2021-12-20 12:42:42 +01:00
|
|
|
.Prop(Label.StylePropertyFont, notoSans12),
|
2021-10-28 18:21:19 +13:00
|
|
|
|
2022-01-13 06:28:17 -08:00
|
|
|
Element<TextureRect>().Class(ContextMenuElement.StyleClassContextMenuExpansionTexture)
|
|
|
|
|
.Prop(TextureRect.StylePropertyTexture, contextMenuExpansionTexture),
|
|
|
|
|
|
|
|
|
|
Element<TextureRect>().Class(VerbMenuElement.StyleClassVerbMenuConfirmationTexture)
|
|
|
|
|
.Prop(TextureRect.StylePropertyTexture, verbMenuConfirmationTexture),
|
|
|
|
|
|
|
|
|
|
// Context menu confirm buttons
|
|
|
|
|
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
|
|
|
|
|
.Prop(ContainerButton.StylePropertyStyleBox, buttonContext),
|
|
|
|
|
|
|
|
|
|
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassNormal)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionDefault),
|
|
|
|
|
|
|
|
|
|
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassHover)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionHovered),
|
|
|
|
|
|
|
|
|
|
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassPressed)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionPressed),
|
|
|
|
|
|
|
|
|
|
Element<ContextMenuElement>().Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassDisabled)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorCautionDisabled),
|
|
|
|
|
|
2022-02-13 20:20:58 -07:00
|
|
|
// Examine buttons
|
|
|
|
|
Element<ExamineButton>().Class(ExamineButton.StyleClassExamineButton)
|
|
|
|
|
.Prop(ContainerButton.StylePropertyStyleBox, buttonContext),
|
|
|
|
|
|
|
|
|
|
Element<ExamineButton>().Class(ExamineButton.StyleClassExamineButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassNormal)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContext),
|
|
|
|
|
|
|
|
|
|
Element<ExamineButton>().Class(ExamineButton.StyleClassExamineButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassHover)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContextHover),
|
|
|
|
|
|
|
|
|
|
Element<ExamineButton>().Class(ExamineButton.StyleClassExamineButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassPressed)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContextPressed),
|
|
|
|
|
|
|
|
|
|
Element<ExamineButton>().Class(ExamineButton.StyleClassExamineButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassDisabled)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContextDisabled),
|
|
|
|
|
|
2021-08-12 10:05:02 -07:00
|
|
|
// Thin buttons (No padding nor vertical margin)
|
|
|
|
|
Element<EntityContainerButton>().Class(StyleClassStorageButton)
|
|
|
|
|
.Prop(ContainerButton.StylePropertyStyleBox, buttonStorage),
|
|
|
|
|
|
|
|
|
|
Element<EntityContainerButton>().Class(StyleClassStorageButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassNormal)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorDefault),
|
|
|
|
|
|
|
|
|
|
Element<EntityContainerButton>().Class(StyleClassStorageButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassHover)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorHovered),
|
|
|
|
|
|
|
|
|
|
Element<EntityContainerButton>().Class(StyleClassStorageButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassPressed)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorPressed),
|
|
|
|
|
|
|
|
|
|
Element<EntityContainerButton>().Class(StyleClassStorageButton)
|
|
|
|
|
.Pseudo(ContainerButton.StylePseudoClassDisabled)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, ButtonColorDisabled),
|
|
|
|
|
|
2020-12-13 14:28:20 -08:00
|
|
|
// action slot hotbar buttons
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ActionSlot), null, null, new[] {ContainerButton.StylePseudoClassNormal}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, buttonRect),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ActionSlot), null, null, new[] {ContainerButton.StylePseudoClassHover}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, buttonRectHover),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ActionSlot), null, null, new[] {ContainerButton.StylePseudoClassPressed}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, buttonRectPressed),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ActionSlot), null, null, new[] {ContainerButton.StylePseudoClassDisabled}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, buttonRectDisabled),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
// action menu item buttons
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ActionMenuItem), null, null, new[] {ContainerButton.StylePseudoClassNormal}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, buttonRectActionMenuItem),
|
|
|
|
|
}),
|
|
|
|
|
// we don't actually disable the action menu items, only change their style based on the underlying action being revoked
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ActionMenuItem), new [] {StyleClassActionMenuItemRevoked}, null, new[] {ContainerButton.StylePseudoClassNormal}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, buttonRectActionMenuItemRevoked),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ActionMenuItem), null, null, new[] {ContainerButton.StylePseudoClassHover}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, buttonRectActionMenuItemHover),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ActionMenuItem), null, null, new[] {ContainerButton.StylePseudoClassPressed}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, buttonRectActionMenuItemPressed),
|
|
|
|
|
}),
|
|
|
|
|
|
2019-02-18 09:16:06 +01:00
|
|
|
// Main menu: Make those buttons bigger.
|
2020-02-14 04:18:14 -08:00
|
|
|
new StyleRule(new SelectorChild(
|
|
|
|
|
new SelectorElement(typeof(Button), null, "mainMenu", null),
|
|
|
|
|
new SelectorElement(typeof(Label), null, null, null)),
|
2019-02-18 09:16:06 +01:00
|
|
|
new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSansBold16),
|
2019-02-18 09:16:06 +01:00
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
// Main menu: also make those buttons slightly more separated.
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(BoxContainer), null, "mainMenuVBox", null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(BoxContainer.StylePropertySeparation, 2),
|
|
|
|
|
}),
|
2019-02-23 16:35:51 +01:00
|
|
|
|
|
|
|
|
// Fancy LineEdit
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(LineEdit), null, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(LineEdit.StylePropertyStyleBox, lineEdit),
|
|
|
|
|
}),
|
2019-03-05 09:39:12 +01:00
|
|
|
|
|
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(typeof(LineEdit), new[] {LineEdit.StyleClassLineEditNotEditable}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty("font-color", new Color(192, 192, 192)),
|
|
|
|
|
}),
|
|
|
|
|
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(typeof(LineEdit), null, null, new[] {LineEdit.StylePseudoClassPlaceholder}),
|
2019-03-05 09:39:12 +01:00
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty("font-color", Color.Gray),
|
|
|
|
|
}),
|
2021-04-20 18:39:39 -05:00
|
|
|
// Chat lineedit - we don't actually draw a stylebox around the lineedit itself, we put it around the
|
|
|
|
|
// input + other buttons, so we must clear the default stylebox
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(LineEdit), new[] {StyleClassChatLineEdit}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(LineEdit.StylePropertyStyleBox, new StyleBoxEmpty()),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
// chat subpanels (chat lineedit backing, popup backings)
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {StyleClassChatSubPanel}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, chatSubBG),
|
|
|
|
|
}),
|
2019-03-05 09:39:12 +01:00
|
|
|
|
2020-12-13 14:28:20 -08:00
|
|
|
// Action searchbox lineedit
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(LineEdit), new[] {StyleClassActionSearchBox}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(LineEdit.StylePropertyStyleBox, actionSearchBox),
|
|
|
|
|
}),
|
|
|
|
|
|
2019-03-05 09:39:12 +01:00
|
|
|
// TabContainer
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(TabContainer), null, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(TabContainer.StylePropertyPanelStyleBox, tabContainerPanel),
|
|
|
|
|
new StyleProperty(TabContainer.StylePropertyTabStyleBox, tabContainerBoxActive),
|
|
|
|
|
new StyleProperty(TabContainer.StylePropertyTabStyleBoxInactive, tabContainerBoxInactive),
|
|
|
|
|
}),
|
|
|
|
|
|
2019-03-11 09:07:56 +01:00
|
|
|
// ProgressBar
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ProgressBar), null, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
2019-05-08 23:19:17 +02:00
|
|
|
new StyleProperty(ProgressBar.StylePropertyBackground, progressBarBackground),
|
2019-03-11 09:07:56 +01:00
|
|
|
new StyleProperty(ProgressBar.StylePropertyForeground, progressBarForeground)
|
|
|
|
|
}),
|
2019-03-11 11:55:29 +01:00
|
|
|
|
|
|
|
|
// CheckBox
|
2020-02-14 18:05:35 -08:00
|
|
|
new StyleRule(new SelectorElement(typeof(TextureRect), new [] { CheckBox.StyleClassCheckBox }, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(TextureRect.StylePropertyTexture, checkBoxTextureUnchecked),
|
|
|
|
|
}),
|
2019-03-11 11:55:29 +01:00
|
|
|
|
2020-02-14 18:05:35 -08:00
|
|
|
new StyleRule(new SelectorElement(typeof(TextureRect), new [] { CheckBox.StyleClassCheckBox, CheckBox.StyleClassCheckBoxChecked }, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(TextureRect.StylePropertyTexture, checkBoxTextureChecked),
|
|
|
|
|
}),
|
2019-03-11 11:55:29 +01:00
|
|
|
|
2021-09-19 19:56:04 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(BoxContainer), new [] { CheckBox.StyleClassCheckBox }, null, null), new[]
|
2019-03-11 11:55:29 +01:00
|
|
|
{
|
2020-02-14 18:05:35 -08:00
|
|
|
new StyleProperty(BoxContainer.StylePropertySeparation, 10),
|
2019-03-11 11:55:29 +01:00
|
|
|
}),
|
2019-04-01 20:05:45 +02:00
|
|
|
|
|
|
|
|
// Tooltip
|
2019-05-08 23:19:17 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(Tooltip), null, null, null), new[]
|
2019-04-01 20:05:45 +02:00
|
|
|
{
|
2019-04-09 17:33:53 +02:00
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, tooltipBox)
|
|
|
|
|
}),
|
|
|
|
|
|
2020-11-09 20:22:19 -08:00
|
|
|
new StyleRule(new SelectorElement(typeof(PanelContainer), new [] { StyleClassTooltipPanel }, null, null), new[]
|
2019-07-30 23:13:05 +02:00
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, tooltipBox)
|
|
|
|
|
}),
|
|
|
|
|
|
2020-04-30 18:09:09 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {"speechBox", "sayBox"}, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, tooltipBox)
|
|
|
|
|
}),
|
|
|
|
|
|
2022-01-11 06:48:18 -08:00
|
|
|
new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {"speechBox", "whisperBox"}, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, whisperBox)
|
|
|
|
|
}),
|
|
|
|
|
|
2020-04-30 18:09:09 +02:00
|
|
|
new StyleRule(new SelectorChild(
|
|
|
|
|
new SelectorElement(typeof(PanelContainer), new[] {"speechBox", "emoteBox"}, null, null),
|
|
|
|
|
new SelectorElement(typeof(RichTextLabel), null, null, null)),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSansItalic12),
|
2020-04-30 18:09:09 +02:00
|
|
|
}),
|
|
|
|
|
|
2020-11-09 20:22:19 -08:00
|
|
|
// alert tooltip
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipAlertTitle}, null, null), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSansBold18)
|
2020-11-09 20:22:19 -08:00
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipAlertDescription}, null, null), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSans16)
|
2020-11-09 20:22:19 -08:00
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipAlertCooldown}, null, null), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSans16)
|
2020-11-09 20:22:19 -08:00
|
|
|
}),
|
|
|
|
|
|
2020-12-13 14:28:20 -08:00
|
|
|
// action tooltip
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipActionTitle}, null, null), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSansBold16)
|
2020-12-13 14:28:20 -08:00
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipActionDescription}, null, null), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSans15)
|
2020-12-13 14:28:20 -08:00
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipActionCooldown}, null, null), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSans15)
|
2020-12-13 14:28:20 -08:00
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipActionRequirements}, null, null), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSans15)
|
2020-12-13 14:28:20 -08:00
|
|
|
}),
|
|
|
|
|
|
2021-10-28 18:21:19 +13:00
|
|
|
// small number for the entity counter in the entity menu
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {EntityMenuElement.StyleClassEntityMenuCountText}, null, null), new[]
|
2021-02-25 19:42:16 -06:00
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSans10),
|
2021-02-25 19:42:16 -06:00
|
|
|
new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Right),
|
|
|
|
|
}),
|
|
|
|
|
|
2020-12-13 14:28:20 -08:00
|
|
|
// hotbar slot
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassHotbarSlotNumber}, null, null), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSansDisplayBold16)
|
2020-12-13 14:28:20 -08:00
|
|
|
}),
|
|
|
|
|
|
2019-04-09 17:33:53 +02:00
|
|
|
// Entity tooltip
|
2019-05-08 23:19:17 +02:00
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(typeof(PanelContainer), new[] {ExamineSystem.StyleClassEntityTooltip}, null,
|
|
|
|
|
null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, tooltipBox)
|
|
|
|
|
}),
|
2019-04-06 17:07:43 +02:00
|
|
|
|
|
|
|
|
// ItemList
|
2019-05-08 23:19:17 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(ItemList), null, null, null), new[]
|
2019-04-06 17:07:43 +02:00
|
|
|
{
|
2019-05-08 23:19:17 +02:00
|
|
|
new StyleProperty(ItemList.StylePropertyBackground,
|
|
|
|
|
new StyleBoxFlat {BackgroundColor = new Color(32, 32, 40)}),
|
|
|
|
|
new StyleProperty(ItemList.StylePropertyItemBackground,
|
2019-05-14 12:54:47 +02:00
|
|
|
itemListItemBackground),
|
2019-05-08 23:19:17 +02:00
|
|
|
new StyleProperty(ItemList.StylePropertyDisabledItemBackground,
|
2019-05-14 12:54:47 +02:00
|
|
|
itemListItemBackgroundDisabled),
|
2019-05-08 23:19:17 +02:00
|
|
|
new StyleProperty(ItemList.StylePropertySelectedItemBackground,
|
2019-05-14 12:54:47 +02:00
|
|
|
itemListBackgroundSelected)
|
2019-04-06 17:07:43 +02:00
|
|
|
}),
|
2019-04-08 18:58:16 +02:00
|
|
|
|
2020-01-09 00:27:52 +01:00
|
|
|
new StyleRule(new SelectorElement(typeof(ItemList), new[] {"transparentItemList"}, null, null), new[]
|
2019-11-21 16:37:15 -08:00
|
|
|
{
|
|
|
|
|
new StyleProperty(ItemList.StylePropertyBackground,
|
|
|
|
|
new StyleBoxFlat {BackgroundColor = Color.Transparent}),
|
|
|
|
|
new StyleProperty(ItemList.StylePropertyItemBackground,
|
|
|
|
|
itemListItemBackgroundTransparent),
|
|
|
|
|
new StyleProperty(ItemList.StylePropertyDisabledItemBackground,
|
|
|
|
|
itemListItemBackgroundDisabled),
|
|
|
|
|
new StyleProperty(ItemList.StylePropertySelectedItemBackground,
|
|
|
|
|
itemListBackgroundSelected)
|
|
|
|
|
}),
|
|
|
|
|
|
2019-04-08 18:58:16 +02:00
|
|
|
// Tree
|
2019-05-08 23:19:17 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(Tree), null, null, null), new[]
|
2019-04-08 18:58:16 +02:00
|
|
|
{
|
2019-05-08 23:19:17 +02:00
|
|
|
new StyleProperty(Tree.StylePropertyBackground,
|
|
|
|
|
new StyleBoxFlat {BackgroundColor = new Color(32, 32, 40)}),
|
2019-04-08 18:58:16 +02:00
|
|
|
new StyleProperty(Tree.StylePropertyItemBoxSelected, new StyleBoxFlat
|
|
|
|
|
{
|
|
|
|
|
BackgroundColor = new Color(55, 55, 68),
|
|
|
|
|
ContentMarginLeftOverride = 4
|
|
|
|
|
})
|
|
|
|
|
}),
|
2019-05-14 01:19:25 +02:00
|
|
|
|
|
|
|
|
// Placeholder
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(Placeholder), null, null, null), new[]
|
2019-05-14 01:19:25 +02:00
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, placeholder),
|
|
|
|
|
}),
|
|
|
|
|
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(typeof(Label), new[] {Placeholder.StyleClassPlaceholderText}, null, null), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFont, notoSans16),
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleProperty(Label.StylePropertyFontColor, new Color(103, 103, 103, 128)),
|
|
|
|
|
}),
|
2019-05-14 09:57:51 +02:00
|
|
|
|
|
|
|
|
// Big Label
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelHeading}, null, null), new[]
|
2019-05-14 09:57:51 +02:00
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFont, notoSansBold16),
|
2019-05-14 09:57:51 +02:00
|
|
|
new StyleProperty(Label.StylePropertyFontColor, NanoGold),
|
2019-10-15 13:12:48 +02:00
|
|
|
}),
|
2019-05-14 09:57:51 +02:00
|
|
|
|
2019-10-18 14:28:24 +02:00
|
|
|
// Bigger Label
|
2020-01-09 00:27:52 +01:00
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelHeadingBigger}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFont, notoSansBold20),
|
2020-01-09 00:27:52 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFontColor, NanoGold),
|
|
|
|
|
}),
|
2019-10-18 14:28:24 +02:00
|
|
|
|
2019-07-20 14:06:54 +02:00
|
|
|
// Small Label
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelSubText}, null, null), new[]
|
2019-07-20 14:06:54 +02:00
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFont, notoSans10),
|
2019-07-20 14:06:54 +02:00
|
|
|
new StyleProperty(Label.StylePropertyFontColor, Color.DarkGray),
|
2019-10-15 13:12:48 +02:00
|
|
|
}),
|
2019-07-20 14:06:54 +02:00
|
|
|
|
2019-11-21 16:37:15 -08:00
|
|
|
// Label Key
|
2020-01-09 00:27:52 +01:00
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelKeyText}, null, null), new[]
|
2019-11-21 16:37:15 -08:00
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFont, notoSansBold12),
|
2019-11-21 16:37:15 -08:00
|
|
|
new StyleProperty(Label.StylePropertyFontColor, NanoGold)
|
|
|
|
|
}),
|
|
|
|
|
|
2020-01-09 00:27:52 +01:00
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelSecondaryColor}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFont, notoSans12),
|
2020-01-09 00:27:52 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFontColor, Color.DarkGray),
|
|
|
|
|
}),
|
Reagent dispensers (#360)
* Expose more private values of Solution and SolutionComponent
Expose SolutionComponent.ContainedSolution and Solution.Contents. Both needed by ReagentDispenserComponent.
* Implement IExamine for SolutionComponent
Allows players to see the contents of a solution by examining the entity which contains it.
* Implement ReagentDispenserComponent
Adds ReagentDispenserComponent. A component which can add or remove reagents from a solution container. It's written in a general way so that it can be used for things such as the Chemical dispensers in chemistry, but also the booze and soda dispensers in the bar.
The chemicals it may dispense are defined in yaml, similar to the way that vending machines define which entities they can dispense, by defining a reagent pack.
* Add chemical dispenser and equipment
Adds the chemical dispenser, beaker, large beaker, dropper, and a few more chemicals.
* Add booze and soda dispensers.
Adds the booze and soda dispensers, and a few chemicals for them to dispense. There's no drink mixing or drunkenness yet.
* Update engine submodule.
* Remove unneeded and commented out code
Had a few WIP notes and debug code bits I forgot to remove beforehand.
* Make SolutionComponent._containedSolution and it's values private again
- Remove `SolutionComponent.ContainedSolution` property, replace with specific access functions to maintain safety.
- Make Solution.Contents return a `ReadOnlyCollection` instead of `_contents` to prevent uncontrolled access to the Solution values.
- Add `SolutionComponent.RemoveAllSolution()`
* Update Content.Shared/Chemistry/Solution.cs
Commits a suggestion from RemieRichards to match the coding style of the rest of the codebase. Using `IReadOnlyList` instead of `IReadOnlyCollection`.
Co-Authored-By: Remie Richards <remierichards@gmail.com>
* Update Content.Shared/GameObjects/Components/Chemistry/SolutionComponent.cs
Commits a suggestion from RemieRichards to match the coding style of the rest of the codebase. Using `IReadOnlyList` instead of `IReadOnlyCollection`.
Co-Authored-By: Remie Richards <remierichards@gmail.com>
* Add import for IReadOnlyList to Shared/SolutionComponent.cs
* Add documentation
* Improve localization
Improve use of ILocalizationManager.
* Resolve ReagentDispenserWindow._localizationManager before using it
Forgot to do this in the last commit, resulting in a crash. Oops.
* Add SolutionCaps.FitsInDispenser. Use in ReagentDispenserComponent.
Used to limit large containers like buckets or mop buckets from being placed in a dispenser. Both have large capacities (500) and weren't designed to hold certain chemicals like a beaker is, so for now they can be blocked from being put in a dispenser by giving them that flag.
* Add colors to new reagents
* Update engine submodule
2019-10-05 09:10:05 -04:00
|
|
|
|
2019-05-14 09:57:51 +02:00
|
|
|
// Big Button
|
2020-02-14 04:18:14 -08:00
|
|
|
new StyleRule(new SelectorChild(
|
|
|
|
|
new SelectorElement(typeof(Button), new[] {StyleClassButtonBig}, null, null),
|
|
|
|
|
new SelectorElement(typeof(Label), null, null, null)),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSans16)
|
2020-02-14 04:18:14 -08:00
|
|
|
}),
|
2019-05-29 12:07:05 -04:00
|
|
|
|
2020-05-02 23:20:12 +02:00
|
|
|
// Popup messages
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPopupMessage}, null, null),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSansItalic10),
|
2020-05-02 23:20:12 +02:00
|
|
|
new StyleProperty("font-color", Color.LightGray),
|
|
|
|
|
}),
|
|
|
|
|
|
2019-05-29 12:07:05 -04:00
|
|
|
//APC and SMES power state label colors
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPowerStateNone}, null, null), new[]
|
2019-05-29 12:07:05 -04:00
|
|
|
{
|
|
|
|
|
new StyleProperty(Label.StylePropertyFontColor, new Color(0.8f, 0.0f, 0.0f))
|
|
|
|
|
}),
|
|
|
|
|
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPowerStateLow}, null, null), new[]
|
2019-05-29 12:07:05 -04:00
|
|
|
{
|
|
|
|
|
new StyleProperty(Label.StylePropertyFontColor, new Color(0.9f, 0.36f, 0.0f))
|
|
|
|
|
}),
|
|
|
|
|
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPowerStateGood}, null, null), new[]
|
2019-05-29 12:07:05 -04:00
|
|
|
{
|
|
|
|
|
new StyleProperty(Label.StylePropertyFontColor, new Color(0.024f, 0.8f, 0.0f))
|
2019-07-14 23:02:45 +02:00
|
|
|
}),
|
|
|
|
|
|
2019-07-17 16:38:08 +02:00
|
|
|
// Those top menu buttons.
|
2021-01-08 20:40:07 -08:00
|
|
|
// these use slight variations on the various BaseButton styles so that the content within them appears centered,
|
|
|
|
|
// which is NOT the case for the default BaseButton styles (OpenLeft/OpenRight adds extra padding on one of the sides
|
|
|
|
|
// which makes the TopButton icons appear off-center, which we don't want).
|
|
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(TopButton), new[] {ButtonSquare}, null, null),
|
2021-01-08 20:40:07 -08:00
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Button.StylePropertyStyleBox, topButtonSquare),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(TopButton), new[] {ButtonOpenLeft}, null, null),
|
2021-01-08 20:40:07 -08:00
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Button.StylePropertyStyleBox, topButtonOpenLeft),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(TopButton), new[] {ButtonOpenRight}, null, null),
|
2021-01-08 20:40:07 -08:00
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Button.StylePropertyStyleBox, topButtonOpenRight),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(TopButton), null, null, new[] {Button.StylePseudoClassNormal}),
|
2021-01-08 20:40:07 -08:00
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorDefault),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(TopButton), new[] {TopButton.StyleClassRedTopButton}, null, new[] {Button.StylePseudoClassNormal}),
|
2021-01-08 20:40:07 -08:00
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorDefaultRed),
|
|
|
|
|
}),
|
2020-09-07 10:52:54 +02:00
|
|
|
|
2019-07-17 16:38:08 +02:00
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(TopButton), null, null, new[] {Button.StylePseudoClassNormal}),
|
2019-10-15 13:12:48 +02:00
|
|
|
new[]
|
|
|
|
|
{
|
2020-09-07 10:52:54 +02:00
|
|
|
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorDefault),
|
2019-10-15 13:12:48 +02:00
|
|
|
}),
|
2019-07-14 23:02:45 +02:00
|
|
|
|
2019-07-17 16:38:08 +02:00
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(TopButton), null, null, new[] {Button.StylePseudoClassPressed}),
|
2019-10-15 13:12:48 +02:00
|
|
|
new[]
|
|
|
|
|
{
|
2020-09-07 10:52:54 +02:00
|
|
|
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorPressed),
|
2019-10-15 13:12:48 +02:00
|
|
|
}),
|
2019-07-14 23:02:45 +02:00
|
|
|
|
2019-07-17 16:38:08 +02:00
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(TopButton), null, null, new[] {Button.StylePseudoClassHover}),
|
2019-10-15 13:12:48 +02:00
|
|
|
new[]
|
|
|
|
|
{
|
2020-09-07 10:52:54 +02:00
|
|
|
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorHovered),
|
2019-10-15 13:12:48 +02:00
|
|
|
}),
|
2019-07-18 23:33:32 +02:00
|
|
|
|
2021-01-08 20:40:07 -08:00
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(TopButton), new[] {TopButton.StyleClassRedTopButton}, null, new[] {Button.StylePseudoClassHover}),
|
2021-01-08 20:40:07 -08:00
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorHoveredRed),
|
|
|
|
|
}),
|
|
|
|
|
|
2019-07-18 23:33:32 +02:00
|
|
|
new StyleRule(
|
2022-02-08 16:24:22 -08:00
|
|
|
new SelectorElement(typeof(Label), new[] {TopButton.StyleClassLabelTopButton}, null, null),
|
2019-10-15 13:12:48 +02:00
|
|
|
new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14),
|
2019-10-15 13:12:48 +02:00
|
|
|
}),
|
2019-09-26 22:32:32 +02:00
|
|
|
|
|
|
|
|
// Targeting doll
|
|
|
|
|
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(typeof(TextureButton), new[] {TargetingDoll.StyleClassTargetDollZone}, null,
|
|
|
|
|
new[] {TextureButton.StylePseudoClassNormal}), new[]
|
|
|
|
|
{
|
2019-10-22 23:16:12 +02:00
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorDefault),
|
2019-10-15 13:12:48 +02:00
|
|
|
}),
|
2019-09-26 22:32:32 +02:00
|
|
|
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(typeof(TextureButton), new[] {TargetingDoll.StyleClassTargetDollZone}, null,
|
|
|
|
|
new[] {TextureButton.StylePseudoClassHover}), new[]
|
|
|
|
|
{
|
2019-10-22 23:16:12 +02:00
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorHovered),
|
2019-10-15 13:12:48 +02:00
|
|
|
}),
|
2019-09-26 22:32:32 +02:00
|
|
|
|
2019-10-15 13:12:48 +02:00
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorElement(typeof(TextureButton), new[] {TargetingDoll.StyleClassTargetDollZone}, null,
|
|
|
|
|
new[] {TextureButton.StylePseudoClassPressed}), new[]
|
|
|
|
|
{
|
2019-10-22 23:16:12 +02:00
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorPressed),
|
2019-10-15 13:12:48 +02:00
|
|
|
}),
|
2019-10-18 14:28:24 +02:00
|
|
|
|
|
|
|
|
// NanoHeading
|
|
|
|
|
|
|
|
|
|
new StyleRule(
|
|
|
|
|
new SelectorChild(
|
|
|
|
|
SelectorElement.Type(typeof(NanoHeading)),
|
|
|
|
|
SelectorElement.Type(typeof(PanelContainer))),
|
|
|
|
|
new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, nanoHeadingBox),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
// StripeBack
|
|
|
|
|
new StyleRule(
|
|
|
|
|
SelectorElement.Type(typeof(StripeBack)),
|
2020-01-09 00:27:52 +01:00
|
|
|
new[]
|
2019-10-18 14:28:24 +02:00
|
|
|
{
|
|
|
|
|
new StyleProperty(StripeBack.StylePropertyBackground, stripeBack),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
// StyleClassLabelBig
|
|
|
|
|
new StyleRule(
|
|
|
|
|
SelectorElement.Class(StyleClassLabelBig),
|
2020-01-09 00:27:52 +01:00
|
|
|
new[]
|
2019-10-18 14:28:24 +02:00
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSans16),
|
2019-10-18 14:28:24 +02:00
|
|
|
}),
|
2020-01-09 00:27:52 +01:00
|
|
|
|
|
|
|
|
// StyleClassItemStatus
|
|
|
|
|
new StyleRule(SelectorElement.Class(StyleClassItemStatus), new[]
|
|
|
|
|
{
|
2021-12-20 12:42:42 +01:00
|
|
|
new StyleProperty("font", notoSans10),
|
2020-01-09 00:27:52 +01:00
|
|
|
}),
|
2020-01-15 14:27:47 +01:00
|
|
|
|
|
|
|
|
// Slider
|
|
|
|
|
new StyleRule(SelectorElement.Type(typeof(Slider)), new []
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Slider.StylePropertyBackground, sliderBackBox),
|
|
|
|
|
new StyleProperty(Slider.StylePropertyForeground, sliderForeBox),
|
|
|
|
|
new StyleProperty(Slider.StylePropertyGrabber, sliderGrabBox),
|
|
|
|
|
new StyleProperty(Slider.StylePropertyFill, sliderFillBox),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(Slider), new []{StyleClassSliderRed}, null, null), new []
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Slider.StylePropertyFill, sliderFillRed),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(Slider), new []{StyleClassSliderGreen}, null, null), new []
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Slider.StylePropertyFill, sliderFillGreen),
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(Slider), new []{StyleClassSliderBlue}, null, null), new []
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Slider.StylePropertyFill, sliderFillBlue),
|
2020-02-13 00:47:46 -08:00
|
|
|
}),
|
|
|
|
|
|
2022-02-08 13:54:41 -07:00
|
|
|
new StyleRule(new SelectorElement(typeof(Slider), new []{StyleClassSliderWhite}, null, null), new []
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Slider.StylePropertyFill, sliderFillWhite),
|
|
|
|
|
}),
|
|
|
|
|
|
2021-04-20 18:39:39 -05:00
|
|
|
// chat channel option selector
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(Button), new[] {StyleClassChatChannelSelectorButton}, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Button.StylePropertyStyleBox, chatChannelButton),
|
|
|
|
|
}),
|
|
|
|
|
// chat filter button
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ContainerButton), new[] {StyleClassChatFilterOptionButton}, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, chatFilterButton),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ContainerButton), new[] {StyleClassChatFilterOptionButton}, null, new[] {ContainerButton.StylePseudoClassNormal}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorDefault),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ContainerButton), new[] {StyleClassChatFilterOptionButton}, null, new[] {ContainerButton.StylePseudoClassHover}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorHovered),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ContainerButton), new[] {StyleClassChatFilterOptionButton}, null, new[] {ContainerButton.StylePseudoClassPressed}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorPressed),
|
|
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(ContainerButton), new[] {StyleClassChatFilterOptionButton}, null, new[] {ContainerButton.StylePseudoClassDisabled}), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorDisabled),
|
|
|
|
|
}),
|
|
|
|
|
|
2020-02-14 18:05:35 -08:00
|
|
|
// OptionButton
|
2020-09-07 10:52:54 +02:00
|
|
|
new StyleRule(new SelectorElement(typeof(OptionButton), null, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, BaseButton),
|
|
|
|
|
}),
|
2020-02-14 18:05:35 -08:00
|
|
|
new StyleRule(new SelectorElement(typeof(OptionButton), null, null, new[] {ContainerButton.StylePseudoClassNormal}), new[]
|
|
|
|
|
{
|
2020-09-07 10:52:54 +02:00
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorDefault),
|
2020-02-14 18:05:35 -08:00
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(OptionButton), null, null, new[] {ContainerButton.StylePseudoClassHover}), new[]
|
|
|
|
|
{
|
2020-09-07 10:52:54 +02:00
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorHovered),
|
2020-02-14 18:05:35 -08:00
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(OptionButton), null, null, new[] {ContainerButton.StylePseudoClassPressed}), new[]
|
|
|
|
|
{
|
2020-09-07 10:52:54 +02:00
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorPressed),
|
2020-02-14 18:05:35 -08:00
|
|
|
}),
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(OptionButton), null, null, new[] {ContainerButton.StylePseudoClassDisabled}), new[]
|
|
|
|
|
{
|
2020-09-07 10:52:54 +02:00
|
|
|
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorDisabled),
|
2020-02-14 18:05:35 -08:00
|
|
|
}),
|
|
|
|
|
|
2020-02-13 00:47:46 -08:00
|
|
|
new StyleRule(new SelectorElement(typeof(TextureRect), new[] {OptionButton.StyleClassOptionTriangle}, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(TextureRect.StylePropertyTexture, textureInvertedTriangle),
|
|
|
|
|
//new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#FFFFFF")),
|
|
|
|
|
}),
|
2020-02-14 18:05:35 -08:00
|
|
|
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(Label), new[] { OptionButton.StyleClassOptionButton }, null, null), new[]
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Center),
|
|
|
|
|
}),
|
2020-04-04 15:10:51 +02:00
|
|
|
|
|
|
|
|
new StyleRule(new SelectorElement(typeof(PanelContainer), new []{ ClassHighDivider}, null, null), new []
|
|
|
|
|
{
|
|
|
|
|
new StyleProperty(PanelContainer.StylePropertyPanel, new StyleBoxFlat { BackgroundColor = NanoGold, ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2}),
|
2021-02-16 15:07:17 +01:00
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
Element<PanelContainer>().Class(ClassAngleRect)
|
|
|
|
|
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#25252A")),
|
|
|
|
|
|
2021-11-02 01:12:55 +01:00
|
|
|
Element<PanelContainer>().Class(ClassLowDivider)
|
|
|
|
|
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat
|
|
|
|
|
{
|
|
|
|
|
BackgroundColor = Color.FromHex("#444"),
|
|
|
|
|
ContentMarginLeftOverride = 2,
|
|
|
|
|
ContentMarginBottomOverride = 2
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
Element<Label>().Class("FancyWindowTitle")
|
2021-12-20 12:42:42 +01:00
|
|
|
.Prop("font", boxFont13)
|
2021-11-02 01:12:55 +01:00
|
|
|
.Prop("font-color", NanoGold),
|
|
|
|
|
|
|
|
|
|
Element<PanelContainer>().Class("WindowHeadingBackground")
|
|
|
|
|
.Prop("panel", new StyleBoxTexture(BaseButtonOpenLeft) { Padding = default })
|
|
|
|
|
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#1F1F23")),
|
|
|
|
|
|
|
|
|
|
Element<PanelContainer>().Class("Inset")
|
|
|
|
|
.Prop("panel", insetBack),
|
|
|
|
|
|
|
|
|
|
Element<Label>().Class("StatusFieldTitle")
|
|
|
|
|
.Prop("font-color", NanoGold),
|
|
|
|
|
|
|
|
|
|
Element<Label>().Class("Good")
|
|
|
|
|
.Prop("font-color", GoodGreenFore),
|
|
|
|
|
|
|
|
|
|
Element<Label>().Class("Caution")
|
|
|
|
|
.Prop("font-color", ConcerningOrangeFore),
|
|
|
|
|
|
|
|
|
|
Element<Label>().Class("Danger")
|
|
|
|
|
.Prop("font-color", DangerousRedFore),
|
|
|
|
|
|
|
|
|
|
Element<Label>().Class("Disabled")
|
|
|
|
|
.Prop("font-color", DisabledFore),
|
|
|
|
|
|
2020-04-04 15:10:51 +02:00
|
|
|
}).ToList());
|
2019-02-18 09:16:06 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|