This commit is contained in:
ntr committed 2023-08-22 00:12:06 +10:00
1 parent 331e811e2d
commit fd985dd489
25 files changed
+1462 -235

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<InterfaceIcon icon="Logo" style="-unity-font: resource(&apos;SpaceRace-Icons&apos;); -unity-font-definition: initial; font-size: 256px; color: rgb(255, 255, 255);" />
</ui:UXML>
+10
View File
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 728748373416e7a1fbb46d5703981b10
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
+15 -6
View File
@@ -1,4 +1,10 @@
class InterfaceIcon : VisualElement {
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
public class InterfaceIcon : VisualElement {
public enum Icon {
// Outputs
Acceleration,
@@ -23,9 +29,12 @@ class InterfaceIcon : VisualElement {
}
static readonly Dictionary<Icon, char> _iconGlyphMap = new() {
{ Icon.CandyCane, '\uf786' },
{ Icon.Sleigh, '\uf7cc' },
{ Icon.Snowflake, '\uf2dc' },
{ Icon.Acceleration, '\ue901' },
{ Icon.Deceleration, '\ue902' },
{ Icon.Strafing, '\ue903' },
{ Icon.Shield, '\ue904' },
{ Icon.Logo, '\ue900' },
};
public Icon icon {
@@ -39,12 +48,12 @@ class InterfaceIcon : VisualElement {
Icon _icon;
Label _iconLabel;
public InterfaceIcon() : this(Icon.CandyCane) {}
public InterfaceIcon() : this(Icon.Strafing) {}
public InterfaceIcon(Icon icon) {
_iconLabel = new Label {
style = {
unityFont = Resources.Load<Font>("fontawesome-solid"),
unityFont = Resources.Load<Font>("SpaceRace-Icons"),
unityFontDefinition = StyleKeyword.None,
},
};
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0297bc555e79b89a8979360dc4d060a3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+1 -2
View File
@@ -1,7 +1,6 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="project://database/Assets/Src/UI/TimingUi.uss?fileID=7433441132597879392&amp;guid=cf92f075876ddf7ffb4cd5c59633ad7b&amp;type=3#TimingUi" />
<ui:VisualElement name="Menu" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/Jura-Medium.otf?fileID=12800000&amp;guid=65648a14640996362a6b0929c723b6e4&amp;type=3#Jura-Medium&apos;); -unity-font-definition: initial; font-size: 38px; letter-spacing: 24px;">
<ui:VisualElement name="header" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0);" />
<ui:VisualElement name="main" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); justify-content: flex-start; flex-direction: row; align-items: flex-start;">
<ui:VisualElement style="flex-grow: 1; background-color: rgba(0, 0, 0, 0);">
<ui:Label tabindex="-1" text="TRACK" display-tooltip-when-elided="true" name="Track" style="-unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/Jura-DemiBold.otf?fileID=12800000&amp;guid=1d103e83da4f14189b3e8b0b865eca3d&amp;type=3#Jura-DemiBold&apos;);" />
@@ -19,7 +18,7 @@
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="footer" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); flex-direction: row; align-items: center; justify-content: space-between;">
<ui:VisualElement name="title" style="height: 100%; flex-basis: 500px; background-image: url(&apos;project://database/Assets/SpaceRace.Logo.png?fileID=2800000&amp;guid=d3ddae9037aad6b64ad0eef21e50b3cb&amp;type=3#SpaceRace.Logo&apos;); margin-left: 5%; margin-bottom: 5%;" />
<ui:VisualElement style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); background-image: url(&apos;project://database/Assets/Images/SpaceRace.Logo.svg?fileID=6192944022281365145&amp;guid=5f1dd9179ef164d75a07d1bfc8414343&amp;type=3#SpaceRace.Logo&apos;); height: 128px; flex-basis: 400px; width: 512px; flex-shrink: 0;" />
<ui:Button text="EXIT" display-tooltip-when-elided="true" name="exit" />
</ui:VisualElement>
</ui:VisualElement>