diff --git a/Assets/Src/UI/Crosshair.uxml b/Assets/Src/UI/Crosshair.uxml
index 7a16ff2..38bc683 100644
--- a/Assets/Src/UI/Crosshair.uxml
+++ b/Assets/Src/UI/Crosshair.uxml
@@ -1,6 +1,5 @@
-
-
-
+
+
diff --git a/Assets/Src/UI/CrosshairComponents.cs b/Assets/Src/UI/CrosshairComponents.cs
new file mode 100644
index 0000000..08a33ca
--- /dev/null
+++ b/Assets/Src/UI/CrosshairComponents.cs
@@ -0,0 +1,212 @@
+using System;
+
+using Unity.Collections;
+using UnityEngine;
+using UnityEngine.UIElements;
+
+namespace CrosshairComponents {
+ public class ThreeArmCrosshair : VisualElement {
+ // Need this uxml traits and factory for it to show up in editor
+ public new class UxmlTraits : VisualElement.UxmlTraits {
+ public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) {
+ base.Init(ve, bag, cc);
+ }
+ }
+ public new class UxmlFactory : UxmlFactory { }
+
+ static CustomStyleProperty s_TrackColor = new CustomStyleProperty("--track-color");
+ static CustomStyleProperty s_ProgressColor = new CustomStyleProperty("--progress-color");
+
+ Color m_TrackColor = Color.white;
+ Color m_SpeedColor = Color.white;
+
+ // This is the label that displays the percentage.
+ Label m_Label;
+
+ // This is the number that the Label displays as a percentage.
+ float m_Speed;
+
+ public float speed {
+ get => m_Speed;
+ set {
+ // Whenever the progress property changes, MarkDirtyRepaint() is named. This causes a call to the
+ // generateVisualContents callback.
+ m_Speed = value;
+ m_Label.text = Mathf.Clamp(Mathf.Round(value), 0, 100) + "%";
+ MarkDirtyRepaint();
+ }
+ }
+
+ public ThreeArmCrosshair() {
+ // Create a Label, add a USS class name, and add it to this visual tree.
+ m_Label = new Label();
+ Add(m_Label);
+
+ // Register a callback after custom style resolution.
+ RegisterCallback(evt => CustomStylesResolved(evt));
+
+ // Register a callback to generate the visual content of the control.
+ generateVisualContent += GenerateVisualContent;
+ }
+
+ static void CustomStylesResolved(CustomStyleResolvedEvent evt) {
+ ThreeArmCrosshair element = (ThreeArmCrosshair)evt.currentTarget;
+ element.UpdateCustomStyles();
+ }
+
+ // After the custom colors are resolved, this method uses them to color the meshes and (if necessary) repaint
+ // the control.
+ void UpdateCustomStyles() {
+ bool repaint = false;
+ if (customStyle.TryGetValue(s_ProgressColor, out m_SpeedColor))
+ repaint = true;
+
+ if (customStyle.TryGetValue(s_TrackColor, out m_TrackColor))
+ repaint = true;
+
+ if (repaint)
+ MarkDirtyRepaint();
+ }
+
+ void GenerateVisualContent(MeshGenerationContext context) {
+ float width = contentRect.width;
+ float height = contentRect.height;
+
+ float length = height / 100;
+
+ Vector2 centre = new Vector2(width / 2, height / 2);
+ Vector2 centreArm = new Vector2(centre.x, centre.y - length);
+
+ float angle = (float)(Math.PI / 3);
+ float angleSin = (float)Math.Sin(angle);
+ Vector2 rightArm = new Vector2(centre.x + angleSin * length, centre.y + angleSin * length);
+ Vector2 leftArm = new Vector2(centre.x - angleSin * length, centre.y + angleSin * length);
+
+ var painter = context.painter2D;
+ painter.lineWidth = 2.0f;
+ painter.lineCap = LineCap.Butt;
+ painter.strokeColor = m_TrackColor;
+
+ painter.BeginPath();
+ painter.MoveTo(centre);
+ painter.LineTo(centreArm);
+ painter.Stroke();
+
+ painter.BeginPath();
+ painter.MoveTo(centre);
+ painter.LineTo(rightArm);
+ painter.Stroke();
+
+ painter.BeginPath();
+ painter.MoveTo(centre);
+ painter.LineTo(leftArm);
+ painter.Stroke();
+ }
+ }
+
+ public class FourArmCrosshair : VisualElement {
+ // Need this uxml traits and factory for it to show up in editor
+ public new class UxmlTraits : VisualElement.UxmlTraits {
+ public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) {
+ base.Init(ve, bag, cc);
+ }
+ }
+ public new class UxmlFactory : UxmlFactory { }
+
+ // These are USS class names for the control overall and the label.
+ public static readonly string ussClassName = "crosshair";
+ public static readonly string ussLabelClassName = "crosshair__label";
+
+ static CustomStyleProperty s_TrackColor = new CustomStyleProperty("--track-color");
+ static CustomStyleProperty s_ProgressColor = new CustomStyleProperty("--progress-color");
+
+ Color m_TrackColor = Color.white;
+ Color m_SpeedColor = Color.white;
+
+ // This is the label that displays the percentage.
+ Label m_Label;
+
+ // This is the number that the Label displays as a percentage.
+ float m_Speed;
+
+ public float speed {
+ get => m_Speed;
+ set {
+ // Whenever the progress property changes, MarkDirtyRepaint() is named. This causes a call to the
+ // generateVisualContents callback.
+ m_Speed = value;
+ m_Label.text = Mathf.Clamp(Mathf.Round(value), 0, 100) + "%";
+ MarkDirtyRepaint();
+ }
+ }
+
+ public FourArmCrosshair() {
+ // Create a Label, add a USS class name, and add it to this visual tree.
+ m_Label = new Label();
+ Add(m_Label);
+
+ // Register a callback after custom style resolution.
+ RegisterCallback(evt => CustomStylesResolved(evt));
+
+ // Register a callback to generate the visual content of the control.
+ generateVisualContent += GenerateVisualContent;
+ }
+
+ static void CustomStylesResolved(CustomStyleResolvedEvent evt) {
+ FourArmCrosshair element = (FourArmCrosshair)evt.currentTarget;
+ element.UpdateCustomStyles();
+ }
+
+ // After the custom colors are resolved, this method uses them to color the meshes and (if necessary) repaint
+ // the control.
+ void UpdateCustomStyles() {
+ bool repaint = false;
+ if (customStyle.TryGetValue(s_ProgressColor, out m_SpeedColor))
+ repaint = true;
+
+ if (customStyle.TryGetValue(s_TrackColor, out m_TrackColor))
+ repaint = true;
+
+ if (repaint)
+ MarkDirtyRepaint();
+ }
+
+ void GenerateVisualContent(MeshGenerationContext context) {
+ float width = contentRect.width;
+ float height = contentRect.height;
+
+ float length = height / 100;
+
+ Vector2 centre = new Vector2(width / 2, height / 2);
+ Vector2 topArm = new Vector2(centre.x, centre.y - length);
+ Vector2 rightArm = new Vector2(centre.x + length, centre.y);
+ Vector2 leftArm = new Vector2(centre.x - length, centre.y);
+ Vector2 bottomArm = new Vector2(centre.x, centre.y + length);
+
+ var painter = context.painter2D;
+ painter.lineWidth = 2.0f;
+ painter.lineCap = LineCap.Butt;
+ painter.strokeColor = m_TrackColor;
+
+ painter.BeginPath();
+ painter.MoveTo(centre);
+ painter.LineTo(topArm);
+ painter.Stroke();
+
+ painter.BeginPath();
+ painter.MoveTo(centre);
+ painter.LineTo(bottomArm);
+ painter.Stroke();
+
+ painter.BeginPath();
+ painter.MoveTo(centre);
+ painter.LineTo(rightArm);
+ painter.Stroke();
+
+ painter.BeginPath();
+ painter.MoveTo(centre);
+ painter.LineTo(leftArm);
+ painter.Stroke();
+ }
+ }
+}
diff --git a/Assets/Src/UI/CrosshairComponents.cs.meta b/Assets/Src/UI/CrosshairComponents.cs.meta
new file mode 100644
index 0000000..48317c0
--- /dev/null
+++ b/Assets/Src/UI/CrosshairComponents.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 34c48ca28628408a493e22a9a93f7231
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Src/UI/CrosshairComponents.uss b/Assets/Src/UI/CrosshairComponents.uss
new file mode 100644
index 0000000..b72b4e4
--- /dev/null
+++ b/Assets/Src/UI/CrosshairComponents.uss
@@ -0,0 +1,4 @@
+.crosshair {
+ width: 100%;
+ height: 100%;
+}
diff --git a/Assets/Src/UI/CrosshairComponents.uss.meta b/Assets/Src/UI/CrosshairComponents.uss.meta
new file mode 100644
index 0000000..415feac
--- /dev/null
+++ b/Assets/Src/UI/CrosshairComponents.uss.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 48feeaa21d44b719b9ecf7857f06e39c
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
+ disableValidation: 0
diff --git a/Assets/Src/RadialProgress.cs b/Assets/Src/UI/RadialProgress.cs
similarity index 99%
rename from Assets/Src/RadialProgress.cs
rename to Assets/Src/UI/RadialProgress.cs
index 12eac53..3085836 100644
--- a/Assets/Src/RadialProgress.cs
+++ b/Assets/Src/UI/RadialProgress.cs
@@ -4,7 +4,6 @@ using UnityEngine.UIElements;
namespace SpaceRaceUi
{
-
// An element that displays progress inside a partially filled circle
public class RadialProgress : VisualElement
{
diff --git a/Assets/Src/RadialProgress.cs.meta b/Assets/Src/UI/RadialProgress.cs.meta
similarity index 100%
rename from Assets/Src/RadialProgress.cs.meta
rename to Assets/Src/UI/RadialProgress.cs.meta
diff --git a/TODO.md b/TODO.md
index 3f553e2..9ba94d6 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,8 +1,6 @@
# SpaceRace!
-- show result on finish lap
- - hide current time and pb
- - TOTAL_TIME DELTA
+- ballin triforce crosshair
- shields