diff --git a/Assets/Soundings/Resources/Interface.ttf b/Assets/Soundings/Resources/Interface.ttf new file mode 100644 index 0000000..adb8947 Binary files /dev/null and b/Assets/Soundings/Resources/Interface.ttf differ diff --git a/Assets/Soundings/Resources/Interface.ttf.meta b/Assets/Soundings/Resources/Interface.ttf.meta new file mode 100644 index 0000000..e21e8ca --- /dev/null +++ b/Assets/Soundings/Resources/Interface.ttf.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 28a61adae8abf17e79c80cd8bb272cd6 +TrueTypeFontImporter: + externalObjects: {} + serializedVersion: 4 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 0 + characterPadding: 1 + includeFontData: 1 + fontNames: + - Liberation Sans + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + ascentCalculationMode: 1 + useLegacyBoundsCalculation: 0 + shouldRoundAdvanceValue: 1 + subsetRecipes: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Runtime/OperationsPage.cs b/Assets/Soundings/Runtime/OperationsPage.cs index 53f4938..d661300 100644 --- a/Assets/Soundings/Runtime/OperationsPage.cs +++ b/Assets/Soundings/Runtime/OperationsPage.cs @@ -132,7 +132,7 @@ namespace Soundings private static void Stepper(VisualElement parent, string value, string id, Action minus, Action plus, bool canMinus, bool canPlus) { var stepper = Add(parent, "stepper"); - Button down = Action("−", minus, "step", id + "-minus"); + Button down = Action("-", minus, "step", id + "-minus"); down.tooltip = id == "fare" ? "Lower passenger fare by $50" : "Buy 10 fewer tons"; down.SetEnabled(canMinus); stepper.Add(down); diff --git a/Assets/Soundings/Runtime/SoundingsApp.cs b/Assets/Soundings/Runtime/SoundingsApp.cs index e10ee7d..78078d1 100644 --- a/Assets/Soundings/Runtime/SoundingsApp.cs +++ b/Assets/Soundings/Runtime/SoundingsApp.cs @@ -8,6 +8,7 @@ namespace Soundings { private const string SaveKey = "soundings.company.v1"; private static readonly string[] Pages = { "Operations", "Deck plans", "Shipyard", "Ports", "Finance" }; + private static FontDefinition interfaceFont; private Company company; private Harbor harbor; private PanelSettings panel; @@ -39,6 +40,7 @@ namespace Soundings harbor = gameObject.AddComponent(); harbor.Initialize(); displayFont = Resources.Load("Display"); + interfaceFont = FontDefinition.FromFont(Resources.Load("Interface")); panel = ScriptableObject.CreateInstance(); panel.scaleMode = PanelScaleMode.ScaleWithScreenSize; panel.referenceResolution = new Vector2Int(1440, 810); @@ -49,6 +51,7 @@ namespace Soundings document.panelSettings = panel; root = document.rootVisualElement; root.style.flexGrow = 1; + root.style.unityFontDefinition = interfaceFont; root.styleSheets.Add(Resources.Load("Soundings")); company = autoSmoke ? null : Load(); Render(); @@ -406,6 +409,7 @@ namespace Soundings private static Label Text(string value, string classes) { var label = new Label(value) { pickingMode = PickingMode.Ignore }; + label.style.unityFontDefinition = interfaceFont; Classes(label, classes); return label; } @@ -427,6 +431,7 @@ namespace Soundings private static Button Action(string text, Action clicked, string classes = "", string id = null) { var button = new Button(clicked) { text = text, name = id ?? text }; + button.style.unityFontDefinition = interfaceFont; Classes(button, "action " + classes); return button; } diff --git a/Assets/WebGLTemplates/Soundings/index.html b/Assets/WebGLTemplates/Soundings/index.html index 60f109b..ee01075 100644 --- a/Assets/WebGLTemplates/Soundings/index.html +++ b/Assets/WebGLTemplates/Soundings/index.html @@ -3,6 +3,7 @@ + {{{ PRODUCT_NAME }}}