icons
This commit is contained in:
1 parent
331e811e2d
commit
fd985dd489
25 files changed
+1462
-235
No files matched your search
@@ -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('SpaceRace-Icons'); -unity-font-definition: initial; font-size: 256px; color: rgb(255, 255, 255);" />
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 728748373416e7a1fbb46d5703981b10
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0297bc555e79b89a8979360dc4d060a3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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&guid=cf92f075876ddf7ffb4cd5c59633ad7b&type=3#TimingUi" />
|
||||
<ui:VisualElement name="Menu" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); -unity-font: url('project://database/Assets/UI%20Toolkit/Fonts/Jura-Medium.otf?fileID=12800000&guid=65648a14640996362a6b0929c723b6e4&type=3#Jura-Medium'); -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('project://database/Assets/UI%20Toolkit/Fonts/Jura-DemiBold.otf?fileID=12800000&guid=1d103e83da4f14189b3e8b0b865eca3d&type=3#Jura-DemiBold');" />
|
||||
@@ -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('project://database/Assets/SpaceRace.Logo.png?fileID=2800000&guid=d3ddae9037aad6b64ad0eef21e50b3cb&type=3#SpaceRace.Logo'); margin-left: 5%; margin-bottom: 5%;" />
|
||||
<ui:VisualElement style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); background-image: url('project://database/Assets/Images/SpaceRace.Logo.svg?fileID=6192944022281365145&guid=5f1dd9179ef164d75a07d1bfc8414343&type=3#SpaceRace.Logo'); 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>
|
||||
|
||||
Reference in new issue
Block a user