fix icons
This commit is contained in:
1 parent
2ca70255bc
commit
12f370ba3d
54 files changed
+2211
-212
No files matched your search
@@ -21,7 +21,7 @@
|
||||
<BoostComponents.BoostIndicator name="BoostIndicator" progress="0.25" style="height: 1%;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="strafeCtr" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0);">
|
||||
<InterfaceIcon icon="Strafing" class="interfaceIcon" style="-unity-text-align: upper-center; -unity-font-style: normal;" />
|
||||
<InterfaceIcon icon="Strafe" class="interfaceIcon" style="-unity-text-align: upper-center; -unity-font-style: normal;" />
|
||||
<BoostComponents.BoostIndicator name="BoostIndicator" progress="0.9" style="height: 1%;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="shieldCtr" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0);">
|
||||
|
||||
@@ -9,7 +9,7 @@ public class InterfaceIcon : VisualElement {
|
||||
// Outputs
|
||||
Acceleration,
|
||||
Deceleration,
|
||||
Strafing,
|
||||
Strafe,
|
||||
Shield,
|
||||
|
||||
Crosshair,
|
||||
@@ -33,7 +33,7 @@ public class InterfaceIcon : VisualElement {
|
||||
static readonly Dictionary<Icon, char> _iconGlyphMap = new() {
|
||||
{ Icon.Acceleration, '\u25bc' },
|
||||
{ Icon.Deceleration, '\u25b2' },
|
||||
{ Icon.Strafing, '\u2b94' },
|
||||
{ Icon.Strafe, '\u2b94' },
|
||||
{ Icon.Shield, '\u26c9' },
|
||||
|
||||
{ Icon.Logo, '\u26d0' },
|
||||
@@ -61,7 +61,7 @@ public class InterfaceIcon : VisualElement {
|
||||
Label _iconLabel;
|
||||
Label _detailLabel;
|
||||
|
||||
public InterfaceIcon() : this(Icon.Strafing) {}
|
||||
public InterfaceIcon() : this(Icon.Strafe) {}
|
||||
|
||||
public InterfaceIcon(Icon icon) {
|
||||
_iconLabel = new Label {
|
||||
|
||||
+16
-10
@@ -29,16 +29,26 @@ public class TimingUI : MonoBehaviour {
|
||||
|
||||
static string[] completionMsgs = {
|
||||
"(⌐▨_▨)",
|
||||
"^____^",
|
||||
"(^ _ ^)",
|
||||
"-ˏ`★ˎ`-",
|
||||
"(⌐■_■)",
|
||||
"(⌐▼_▼)"
|
||||
// "(^_^)",
|
||||
};
|
||||
|
||||
void OnEnable() {
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init() {
|
||||
void Start() {
|
||||
Init();
|
||||
}
|
||||
|
||||
public void Init() {
|
||||
if (ShouldHide) {
|
||||
Debug.Log("No sectors found, hiding timing.");
|
||||
uiDocument.enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
uiDocument = GetComponent<UIDocument>();
|
||||
timing = GetComponent<Timing>();
|
||||
|
||||
@@ -65,10 +75,6 @@ public class TimingUI : MonoBehaviour {
|
||||
notice.AddToClassList("hidden");
|
||||
}
|
||||
|
||||
void Start() {
|
||||
if (ShouldHide) uiDocument.enabled = false;
|
||||
}
|
||||
|
||||
void FixedUpdate() {
|
||||
if (timer == null || timing == null) {
|
||||
Debug.LogWarning("no timer");
|
||||
@@ -122,8 +128,8 @@ public class TimingUI : MonoBehaviour {
|
||||
noticeDiff.Clear();
|
||||
noticeDiff.Add(timing.CompareLap(lap).ToLabel());
|
||||
|
||||
int msgIndex = UnityEngine.Random.Range(0, completionMsgs.Length);
|
||||
noticeMsg.text = completionMsgs[msgIndex];
|
||||
// int msgIndex = UnityEngine.Random.Range(0, completionMsgs.Length);
|
||||
// noticeMsg.text = completionMsgs[msgIndex];
|
||||
|
||||
noticeSectors.Clear();
|
||||
foreach (SectorTime sector in lap.Sectors) {
|
||||
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
<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="VisualElement" style="-unity-font: url('project://database/Assets/UI%20Toolkit/Fonts/Jura-Medium.otf?fileID=12800000&guid=65648a14640996362a6b0929c723b6e4&type=3#Jura-Medium'); -unity-font-definition: initial; flex-direction: row; flex-grow: 1; align-items: center;">
|
||||
<ui:VisualElement name="middle" style="flex-grow: 1; align-self: center; justify-content: flex-end; align-items: center; margin-bottom: 32px;">
|
||||
<ui:VisualElement style="flex-grow: 1; background-image: url('project://database/Assets/Images/SpaceRace.Logo.png?fileID=2800000&guid=ae2be62fce183734f8c152bdb637d3b1&type=3#SpaceRace.Logo'); -unity-background-scale-mode: scale-to-fit; -unity-text-align: middle-left; flex-shrink: 0; width: 50%;" />
|
||||
<ui:VisualElement name="puCtr" style="flex-direction: row; flex-grow: 0; justify-content: space-around; margin-bottom: 48px; width: 50%;">
|
||||
<ui:VisualElement name="accelCtr" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0);">
|
||||
<InterfaceIcon class="interfaceIcon" style="-unity-text-align: upper-center; -unity-font-style: normal;" />
|
||||
<ui:Label tabindex="-1" text="Accelerate" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="decelCtr" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0);">
|
||||
<InterfaceIcon icon="Deceleration" class="interfaceIcon" style="-unity-text-align: upper-center; -unity-font-style: normal;" />
|
||||
<ui:Label tabindex="-1" text="Decelerate" parse-escape-sequences="true" display-tooltip-when-elided="true" style="-unity-text-align: upper-left;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="strafeCtr" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0);">
|
||||
<InterfaceIcon icon="Strafing" class="interfaceIcon" style="-unity-text-align: upper-center; -unity-font-style: normal;" />
|
||||
<ui:Label tabindex="-1" text="Strafe" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="shieldCtr" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0);">
|
||||
<InterfaceIcon icon="Shield" text="88" name="ShieldIcon" class="interfaceIcon" style="-unity-text-align: upper-center; -unity-font-style: normal; align-items: center; justify-content: center;" />
|
||||
<ui:Label tabindex="-1" text="Shields" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
<ui:Label tabindex="-1" text="Press Start/Esc to select a track." parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label" style="-unity-text-align: upper-center; letter-spacing: 32px;" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12f7f66e5ad4c104e84fb589592f08e3
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
Reference in new issue
Block a user