diff --git a/Content.Client/Actions/UI/ActionAlertTooltip.cs b/Content.Client/Actions/UI/ActionAlertTooltip.cs index 6a6dd268fe..b64faa56b1 100644 --- a/Content.Client/Actions/UI/ActionAlertTooltip.cs +++ b/Content.Client/Actions/UI/ActionAlertTooltip.cs @@ -4,7 +4,6 @@ using Robust.Client.UserInterface.Controls; using Robust.Shared.IoC; using Robust.Shared.Timing; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Actions.UI @@ -69,7 +68,7 @@ namespace Content.Client.Actions.UI MaxWidth = TooltipTextMaxWidth, StyleClasses = {StyleNano.StyleClassTooltipActionRequirements} }; - requiresLabel.SetMessage(Basic.RenderMarkup("[color=#635c5c]" + + requiresLabel.SetMessage(FormattedMessage.FromMarkup("[color=#635c5c]" + requires + "[/color]")); vbox.AddChild(requiresLabel); @@ -89,7 +88,7 @@ namespace Content.Client.Actions.UI if (timeLeft > TimeSpan.Zero) { var duration = Cooldown.Value.End - Cooldown.Value.Start; - _cooldownLabel.SetMessage(Basic.RenderMarkup( + _cooldownLabel.SetMessage(FormattedMessage.FromMarkup( $"[color=#a10505]{duration.Seconds} sec cooldown ({timeLeft.Seconds + 1} sec remaining)[/color]")); _cooldownLabel.Visible = true; } diff --git a/Content.Client/Actions/UI/ActionSlot.cs b/Content.Client/Actions/UI/ActionSlot.cs index c8fba1f50f..b6fc2bb2c4 100644 --- a/Content.Client/Actions/UI/ActionSlot.cs +++ b/Content.Client/Actions/UI/ActionSlot.cs @@ -16,7 +16,6 @@ using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Timing; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Actions.UI @@ -479,10 +478,10 @@ namespace Content.Client.Actions.UI private FormattedMessage SlotNumberLabel() { - if (SlotNumber > 10) return FormattedMessage.Empty; + if (SlotNumber > 10) return FormattedMessage.FromMarkup(""); var number = Loc.GetString(SlotNumber == 10 ? "0" : SlotNumber.ToString()); var color = (ActionEnabled || !HasAssignment) ? EnabledColor : DisabledColor; - return Basic.RenderMarkup("[color=" + color + "]" + number + "[/color]"); + return FormattedMessage.FromMarkup("[color=" + color + "]" + number + "[/color]"); } private void UpdateIcons() diff --git a/Content.Client/Administration/UI/BwoinkWindow.xaml.cs b/Content.Client/Administration/UI/BwoinkWindow.xaml.cs index 7586a10649..c3f000f6ca 100644 --- a/Content.Client/Administration/UI/BwoinkWindow.xaml.cs +++ b/Content.Client/Administration/UI/BwoinkWindow.xaml.cs @@ -18,7 +18,6 @@ using Robust.Shared.Maths; using Robust.Shared.Utility; using Robust.Shared.Network; using Robust.Shared.GameObjects; -using Robust.Shared.Utility.Markup; using YamlDotNet.RepresentationModel; namespace Content.Client.Administration.UI @@ -59,7 +58,9 @@ namespace Content.Client.Administration.UI public void ReceiveLine(string text) { - TextOutput.AddMessage(Basic.RenderMarkup(text)); + var formatted = new FormattedMessage(1); + formatted.AddMarkup(text); + TextOutput.AddMessage(formatted); } } } diff --git a/Content.Client/Changelog/ChangelogWindow.xaml.cs b/Content.Client/Changelog/ChangelogWindow.xaml.cs index c66546a082..a1b2d65eac 100644 --- a/Content.Client/Changelog/ChangelogWindow.xaml.cs +++ b/Content.Client/Changelog/ChangelogWindow.xaml.cs @@ -14,7 +14,6 @@ using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; using static Content.Client.Changelog.ChangelogManager; using static Robust.Client.UserInterface.Controls.BoxContainer; @@ -147,13 +146,13 @@ namespace Content.Client.Changelog Margin = new Thickness(6, 0, 0, 0), }; authorLabel.SetMessage( - Basic.RenderMarkup(Loc.GetString("changelog-author-changed", ("author", author)))); + FormattedMessage.FromMarkup(Loc.GetString("changelog-author-changed", ("author", author)))); ChangelogBody.AddChild(authorLabel); foreach (var change in groupedEntry.SelectMany(c => c.Changes)) { var text = new RichTextLabel(); - text.SetMessage(Basic.RenderMarkup(change.Message)); + text.SetMessage(FormattedMessage.FromMarkup(change.Message)); ChangelogBody.AddChild(new BoxContainer { Orientation = LayoutOrientation.Horizontal, diff --git a/Content.Client/Chat/Managers/ChatManager.cs b/Content.Client/Chat/Managers/ChatManager.cs index 34625be899..60ea578aa1 100644 --- a/Content.Client/Chat/Managers/ChatManager.cs +++ b/Content.Client/Chat/Managers/ChatManager.cs @@ -21,7 +21,6 @@ using Robust.Shared.Log; using Robust.Shared.Network; using Robust.Shared.Timing; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; namespace Content.Client.Chat.Managers { @@ -421,7 +420,7 @@ namespace Content.Client.Chat.Managers return; } - var messages = SplitMessage(Basic.RenderMarkup(msg.Message).ToString()); + var messages = SplitMessage(FormattedMessage.RemoveMarkup(msg.Message)); foreach (var message in messages) { diff --git a/Content.Client/Chat/UI/ChatBox.xaml.cs b/Content.Client/Chat/UI/ChatBox.xaml.cs index d961cb3987..0199d0666a 100644 --- a/Content.Client/Chat/UI/ChatBox.xaml.cs +++ b/Content.Client/Chat/UI/ChatBox.xaml.cs @@ -18,7 +18,6 @@ using Robust.Shared.Localization; using Robust.Shared.Log; using Robust.Shared.Maths; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; namespace Content.Client.Chat.UI { @@ -396,7 +395,7 @@ namespace Content.Client.Chat.UI private void WriteChatMessage(StoredChatMessage message) { - var messageText = Basic.EscapeText(message.Message); + var messageText = FormattedMessage.EscapeText(message.Message); if (!string.IsNullOrEmpty(message.MessageWrap)) { messageText = string.Format(message.MessageWrap, messageText); @@ -503,7 +502,11 @@ namespace Content.Client.Chat.UI { DebugTools.Assert(!Disposed); - Contents.AddMessage(Basic.RenderMarkup(message, new Section{Color=color.ToArgb()})); + var formatted = new FormattedMessage(3); + formatted.PushColor(color); + formatted.AddMarkup(message); + formatted.Pop(); + Contents.AddMessage(formatted); } private void Input_OnTextEntered(LineEdit.LineEditEventArgs args) diff --git a/Content.Client/ContextMenu/UI/ContextMenuElement.xaml.cs b/Content.Client/ContextMenu/UI/ContextMenuElement.xaml.cs index 2caba4ec71..c186e27fd5 100644 --- a/Content.Client/ContextMenu/UI/ContextMenuElement.xaml.cs +++ b/Content.Client/ContextMenu/UI/ContextMenuElement.xaml.cs @@ -7,7 +7,6 @@ using Robust.Client.UserInterface.XAML; using Robust.Shared.IoC; using Robust.Shared.Maths; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; namespace Content.Client.ContextMenu.UI { @@ -46,14 +45,7 @@ namespace Content.Client.ContextMenu.UI /// /// Convenience property to set label text. /// - public string Text { - set - { - var b = new Basic(); - b.AddMarkupPermissive(value.Trim()); - Label.SetMessage(b.Render()); - } - } + public string Text { set => Label.SetMessage(FormattedMessage.FromMarkupPermissive(value.Trim())); } public ContextMenuElement(string? text = null) { diff --git a/Content.Client/Credits/CreditsWindow.xaml.cs b/Content.Client/Credits/CreditsWindow.xaml.cs index cbf9ebe93c..2cd65733e9 100644 --- a/Content.Client/Credits/CreditsWindow.xaml.cs +++ b/Content.Client/Credits/CreditsWindow.xaml.cs @@ -15,7 +15,6 @@ using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; using YamlDotNet.RepresentationModel; using static Robust.Client.UserInterface.Controls.BoxContainer; @@ -144,7 +143,7 @@ namespace Content.Client.Credits var text = _resourceManager.ContentFileReadAllText($"/Credits/{path}"); if (markup) { - label.SetMessage(Basic.RenderMarkup(text.Trim())); + label.SetMessage(FormattedMessage.FromMarkup(text.Trim())); } else { diff --git a/Content.Client/Examine/ExamineSystem.cs b/Content.Client/Examine/ExamineSystem.cs index 58fc9fc05f..d3c3c90eaa 100644 --- a/Content.Client/Examine/ExamineSystem.cs +++ b/Content.Client/Examine/ExamineSystem.cs @@ -181,9 +181,9 @@ namespace Content.Client.Examine message = response.Message; } - foreach (var msg in message.Sections) + foreach (var msg in message.Tags.OfType()) { - if (string.IsNullOrWhiteSpace(msg.Content)) continue; + if (string.IsNullOrWhiteSpace(msg.Text)) continue; var richLabel = new RichTextLabel(); richLabel.SetMessage(message); diff --git a/Content.Client/Ghost/Roles/UI/GhostRoleRulesWindow.xaml.cs b/Content.Client/Ghost/Roles/UI/GhostRoleRulesWindow.xaml.cs index 8aec632f6b..307c47dded 100644 --- a/Content.Client/Ghost/Roles/UI/GhostRoleRulesWindow.xaml.cs +++ b/Content.Client/Ghost/Roles/UI/GhostRoleRulesWindow.xaml.cs @@ -7,7 +7,6 @@ using Robust.Client.UserInterface.XAML; using Robust.Shared.Localization; using Robust.Shared.Timing; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; namespace Content.Client.Ghost.Roles.UI { @@ -18,9 +17,7 @@ namespace Content.Client.Ghost.Roles.UI public GhostRoleRulesWindow(string rules, Action requestAction) { RobustXamlLoader.Load(this); - var b = new Basic(); - b.AddMarkupPermissive(rules + "\n" + Loc.GetString("ghost-roles-window-rules-footer")); - Title.SetMessage(b.Render()); + Title.SetMessage(FormattedMessage.FromMarkupPermissive(rules + "\n" + Loc.GetString("ghost-roles-window-rules-footer"))); RequestButton.OnPressed += requestAction; } diff --git a/Content.Client/HUD/GameHud.cs b/Content.Client/HUD/GameHud.cs index 4fd89226c2..6da65b2f20 100644 --- a/Content.Client/HUD/GameHud.cs +++ b/Content.Client/HUD/GameHud.cs @@ -24,7 +24,6 @@ using Robust.Shared.Log; using Robust.Shared.Maths; using Robust.Shared.Prototypes; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; using static Robust.Client.Input.Keyboard.Key; using static Robust.Client.UserInterface.Controls.BoxContainer; using Control = Robust.Client.UserInterface.Control; @@ -728,7 +727,7 @@ namespace Content.Client.HUD private string? DefaultShortKeyName(BoundKeyFunction keyFunction) { - var name = Basic.EscapeText(_inputManager.GetKeyFunctionButtonString(keyFunction)); + var name = FormattedMessage.EscapeText(_inputManager.GetKeyFunctionButtonString(keyFunction)); return name.Length > 3 ? null : name; } diff --git a/Content.Client/Info/InfoSection.xaml.cs b/Content.Client/Info/InfoSection.xaml.cs index 13dd479734..7cfcb13ac8 100644 --- a/Content.Client/Info/InfoSection.xaml.cs +++ b/Content.Client/Info/InfoSection.xaml.cs @@ -2,7 +2,6 @@ using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; namespace Content.Client.Info; @@ -16,7 +15,7 @@ public partial class InfoSection : BoxContainer TitleLabel.Text = title; if (markup) - Content.SetMessage(Basic.RenderMarkup(text.Trim())); + Content.SetMessage(FormattedMessage.FromMarkup(text.Trim())); else Content.SetMessage(text); } diff --git a/Content.Client/Info/ServerInfo.cs b/Content.Client/Info/ServerInfo.cs index 16de98b95e..d670a43458 100644 --- a/Content.Client/Info/ServerInfo.cs +++ b/Content.Client/Info/ServerInfo.cs @@ -6,7 +6,6 @@ using Robust.Client.UserInterface.Controls; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; namespace Content.Client.Info { @@ -63,7 +62,7 @@ namespace Content.Client.Info public void SetInfoBlob(string markup) { - _richTextLabel.SetMessage(Basic.RenderMarkup(markup)); + _richTextLabel.SetMessage(FormattedMessage.FromMarkup(markup)); } } } diff --git a/Content.Client/Message/RichTextLabelExt.cs b/Content.Client/Message/RichTextLabelExt.cs index 3f3b8008a8..df2c61e306 100644 --- a/Content.Client/Message/RichTextLabelExt.cs +++ b/Content.Client/Message/RichTextLabelExt.cs @@ -1,6 +1,5 @@ using Robust.Client.UserInterface.Controls; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; namespace Content.Client.Message { @@ -8,7 +7,7 @@ namespace Content.Client.Message { public static void SetMarkup(this RichTextLabel label, string markup) { - label.SetMessage(Basic.RenderMarkup(markup)); + label.SetMessage(FormattedMessage.FromMarkup(markup)); } } } diff --git a/Content.Client/Paper/UI/PaperWindow.xaml.cs b/Content.Client/Paper/UI/PaperWindow.xaml.cs index 6dfc11d85b..a35af8fd10 100644 --- a/Content.Client/Paper/UI/PaperWindow.xaml.cs +++ b/Content.Client/Paper/UI/PaperWindow.xaml.cs @@ -4,7 +4,6 @@ using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.XAML; using Robust.Shared.Utility; -using Robust.Shared.Utility.Markup; namespace Content.Client.Paper.UI { @@ -22,9 +21,9 @@ namespace Content.Client.Paper.UI { Input.Visible = true; } - var msg = new Basic(); + var msg = new FormattedMessage(); msg.AddMarkupPermissive(state.Text); - Label.SetMessage(msg.Render()); + Label.SetMessage(msg); } } } diff --git a/Content.Client/Stylesheets/StyleBase.cs b/Content.Client/Stylesheets/StyleBase.cs index 16b49eae64..5804d39134 100644 --- a/Content.Client/Stylesheets/StyleBase.cs +++ b/Content.Client/Stylesheets/StyleBase.cs @@ -4,7 +4,6 @@ using Robust.Client.ResourceManagement; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; -using Robust.Shared.Utility; using Robust.Shared.Maths; namespace Content.Client.Stylesheets @@ -40,57 +39,28 @@ namespace Content.Client.Stylesheets protected StyleBoxTexture BaseAngleRect { get; } - protected IFontLibrary FontLib { get; } - protected StyleBase(IResourceCache resCache) { - FontLib = new FontLibrary( - new FontClass(Id: "notosans", Style: default, Size: (FontSize) 12) - ) as IFontLibrary; - - FontLib.AddFont("notosans", - new FontVariant - ( - FontStyle.Normal, - new [] - { - resCache.GetResource("/Fonts/NotoSans/NotoSans-Regular.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols-Regular.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf") - } - ), - new FontVariant - ( - FontStyle.Italic, - new [] - { - resCache.GetResource("/Fonts/NotoSans/NotoSans-Italic.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols-Regular.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf") - } - ), - new FontVariant - ( - FontStyle.Bold, - new [] - { - resCache.GetResource("/Fonts/NotoSans/NotoSans-Bold.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols-Bold.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf") - } - ), - new FontVariant - ( - FontStyle.Bold | FontStyle.Italic, - new [] - { - resCache.GetResource("/Fonts/NotoSans/NotoSans-BoldItalic.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols-Bold.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf") - } - ) + var notoSans12 = resCache.GetFont + ( + new [] + { + "/Fonts/NotoSans/NotoSans-Regular.ttf", + "/Fonts/NotoSans/NotoSansSymbols-Regular.ttf", + "/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf" + }, + 12 + ); + var notoSans12Italic = resCache.GetFont + ( + new [] + { + "/Fonts/NotoSans/NotoSans-Italic.ttf", + "/Fonts/NotoSans/NotoSansSymbols-Regular.ttf", + "/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf" + }, + 12 ); - var textureCloseButton = resCache.GetTexture("/Textures/Interface/Nano/cross.svg.png"); // Button styles. @@ -181,8 +151,7 @@ namespace Content.Client.Stylesheets new SelectorElement(null, null, null, null), new[] { - new StyleProperty("font-library", FontLib), - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 12)), + new StyleProperty("font", notoSans12), }), // Default font. @@ -190,7 +159,7 @@ namespace Content.Client.Stylesheets new SelectorElement(null, new[] {StyleClassItalic}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", FontStyle.Italic, (FontSize) 12)), + new StyleProperty("font", notoSans12Italic), }), // Window close button base texture. diff --git a/Content.Client/Stylesheets/StyleNano.cs b/Content.Client/Stylesheets/StyleNano.cs index e36a26fd94..5f92cc88c5 100644 --- a/Content.Client/Stylesheets/StyleNano.cs +++ b/Content.Client/Stylesheets/StyleNano.cs @@ -14,7 +14,6 @@ using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.Maths; -using Robust.Shared.Utility; using static Robust.Client.UserInterface.StylesheetHelpers; namespace Content.Client.Stylesheets @@ -110,49 +109,19 @@ namespace Content.Client.Stylesheets public StyleNano(IResourceCache resCache) : base(resCache) { - FontLib.AddFont("notosansdisplay", - new FontVariant - ( - FontStyle.Normal, - new [] - { - resCache.GetResource("/Fonts/NotoSansDisplay/NotoSansDisplay-Regular.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols-Regular.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf") - } - ), - new FontVariant - ( - FontStyle.Bold, - new [] - { - resCache.GetResource("/Fonts/NotoSansDisplay/NotoSansDisplay-Bold.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols-Regular.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf") - } - ), - new FontVariant - ( - FontStyle.Italic, - new [] - { - resCache.GetResource("/Fonts/NotoSansDisplay/NotoSansDisplay-Italic.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols-Regular.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf") - } - ), - new FontVariant - ( - FontStyle.Bold | FontStyle.Italic, - new [] - { - resCache.GetResource("/Fonts/NotoSansDisplay/NotoSansDisplay-BoldItalic.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols-Bold.ttf"), - resCache.GetResource("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf") - } - ) - ); - + 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); var windowHeaderTex = resCache.GetTexture("/Textures/Interface/Nano/window_header.png"); var windowHeader = new StyleBoxTexture { @@ -459,16 +428,7 @@ namespace Content.Client.Stylesheets var sliderFillRed = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Red}; var sliderFillBlue = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Blue}; - FontLib.AddFont("box", - new FontVariant - ( - default, - new [] - { - resCache.GetResource("/Fonts/Boxfont-round/Boxfont Round.ttf") - } - ) - ); + var boxFont13 = resCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 13); var insetBack = new StyleBoxTexture { @@ -485,7 +445,7 @@ namespace Content.Client.Stylesheets new[] { new StyleProperty(Label.StylePropertyFontColor, NanoGold), - new StyleProperty(Label.StylePropertyFont, new FontClass("notosansdisplay", FontStyle.Bold, (FontSize) 14)), + new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14), }), // Alert (white) window title. new StyleRule( @@ -493,7 +453,7 @@ namespace Content.Client.Stylesheets new[] { new StyleProperty(Label.StylePropertyFontColor, Color.White), - new StyleProperty(Label.StylePropertyFont, new FontClass("notosansdisplay", FontStyle.Bold, (FontSize) 14)), + new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14), }), // Window background. new StyleRule( @@ -643,16 +603,16 @@ namespace Content.Client.Stylesheets // Context Menu Labels Element().Class(VerbMenuElement.StyleClassVerbInteractionText) - .Prop(Label.StylePropertyFont, new FontClass("notosans", FontStyle.Bold | FontStyle.Italic, (FontSize) 12)), + .Prop(Label.StylePropertyFont, notoSansBoldItalic12), Element().Class(VerbMenuElement.StyleClassVerbActivationText) - .Prop(Label.StylePropertyFont, new FontClass("notosans", FontStyle.Bold, (FontSize) 12)), + .Prop(Label.StylePropertyFont, notoSansBold12), Element().Class(VerbMenuElement.StyleClassVerbAlternativeText) - .Prop(Label.StylePropertyFont, new FontClass("notosans", FontStyle.Italic, (FontSize) 12)), + .Prop(Label.StylePropertyFont, notoSansItalic12), Element().Class(VerbMenuElement.StyleClassVerbOtherText) - .Prop(Label.StylePropertyFont, new FontClass("notosans", default, (FontSize) 12)), + .Prop(Label.StylePropertyFont, notoSans12), // Thin buttons (No padding nor vertical margin) Element().Class(StyleClassStorageButton) @@ -717,7 +677,7 @@ namespace Content.Client.Stylesheets new SelectorElement(typeof(Label), null, null, null)), new[] { - new StyleProperty("font", new FontClass("notosans", FontStyle.Bold, (FontSize) 16)), + new StyleProperty("font", notoSansBold16), }), // Main menu: also make those buttons slightly more separated. @@ -823,52 +783,52 @@ namespace Content.Client.Stylesheets new SelectorElement(typeof(RichTextLabel), null, null, null)), new[] { - new StyleProperty("font", new FontClass("notosans", FontStyle.Italic, (FontSize) 12)), + new StyleProperty("font", notoSansItalic12), }), // alert tooltip new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipAlertTitle}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", FontStyle.Bold, (FontSize) 18)) + new StyleProperty("font", notoSansBold18) }), new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipAlertDescription}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 16)) + new StyleProperty("font", notoSans16) }), new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipAlertCooldown}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 16)) + new StyleProperty("font", notoSans16) }), // action tooltip new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipActionTitle}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", FontStyle.Bold, (FontSize) 16)) + new StyleProperty("font", notoSansBold16) }), new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipActionDescription}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 15)) + new StyleProperty("font", notoSans15) }), new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipActionCooldown}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 15)) + new StyleProperty("font", notoSans15) }), new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipActionRequirements}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 15)) + new StyleProperty("font", notoSans15) }), // small number for the entity counter in the entity menu new StyleRule(new SelectorElement(typeof(Label), new[] {EntityMenuElement.StyleClassEntityMenuCountText}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 10)), + new StyleProperty("font", notoSans10), new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Right), }), // hotbar slot new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassHotbarSlotNumber}, null, null), new[] { - new StyleProperty("font", new FontClass("notosansdisplay", FontStyle.Bold, (FontSize) 16)) + new StyleProperty("font", notoSansDisplayBold16) }), // Entity tooltip @@ -925,14 +885,14 @@ namespace Content.Client.Stylesheets new StyleRule( new SelectorElement(typeof(Label), new[] {Placeholder.StyleClassPlaceholderText}, null, null), new[] { - new StyleProperty(Label.StylePropertyFont, new FontClass("notosans", default, (FontSize) 16)), + new StyleProperty(Label.StylePropertyFont, notoSans16), new StyleProperty(Label.StylePropertyFontColor, new Color(103, 103, 103, 128)), }), // Big Label new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelHeading}, null, null), new[] { - new StyleProperty(Label.StylePropertyFont, new FontClass("notosans", FontStyle.Bold, (FontSize) 16)), + new StyleProperty(Label.StylePropertyFont, notoSansBold16), new StyleProperty(Label.StylePropertyFontColor, NanoGold), }), @@ -940,28 +900,28 @@ namespace Content.Client.Stylesheets new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelHeadingBigger}, null, null), new[] { - new StyleProperty(Label.StylePropertyFont, new FontClass("notosans", FontStyle.Bold, (FontSize) 20)), + new StyleProperty(Label.StylePropertyFont, notoSansBold20), new StyleProperty(Label.StylePropertyFontColor, NanoGold), }), // Small Label new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelSubText}, null, null), new[] { - new StyleProperty(Label.StylePropertyFont, new FontClass("notosans", default, (FontSize) 10)), + new StyleProperty(Label.StylePropertyFont, notoSans10), new StyleProperty(Label.StylePropertyFontColor, Color.DarkGray), }), // Label Key new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelKeyText}, null, null), new[] { - new StyleProperty(Label.StylePropertyFont, new FontClass("notosans", FontStyle.Bold, (FontSize) 12)), + new StyleProperty(Label.StylePropertyFont, notoSansBold12), new StyleProperty(Label.StylePropertyFontColor, NanoGold) }), new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelSecondaryColor}, null, null), new[] { - new StyleProperty(Label.StylePropertyFont, new FontClass("notosans", default, (FontSize) 12)), + new StyleProperty(Label.StylePropertyFont, notoSans12), new StyleProperty(Label.StylePropertyFontColor, Color.DarkGray), }), @@ -971,14 +931,14 @@ namespace Content.Client.Stylesheets new SelectorElement(typeof(Label), null, null, null)), new[] { - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 16)) + new StyleProperty("font", notoSans16) }), // Popup messages new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPopupMessage}, null, null), new[] { - new StyleProperty("font", new FontClass("notosans", FontStyle.Italic, (FontSize) 10)), + new StyleProperty("font", notoSansItalic10), new StyleProperty("font-color", Color.LightGray), }), @@ -1069,7 +1029,7 @@ namespace Content.Client.Stylesheets new SelectorElement(typeof(Label), new[] {GameHud.TopButton.StyleClassLabelTopButton}, null, null), new[] { - new StyleProperty(Label.StylePropertyFont, new FontClass("notosansdisplay", FontStyle.Bold, (FontSize) 14)), + new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14), }), // Targeting doll @@ -1119,13 +1079,13 @@ namespace Content.Client.Stylesheets SelectorElement.Class(StyleClassLabelBig), new[] { - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 16)), + new StyleProperty("font", notoSans16), }), // StyleClassItemStatus new StyleRule(SelectorElement.Class(StyleClassItemStatus), new[] { - new StyleProperty("font", new FontClass("notosans", default, (FontSize) 10)), + new StyleProperty("font", notoSans10), }), // Slider @@ -1230,7 +1190,7 @@ namespace Content.Client.Stylesheets }), Element