This commit is contained in:
ntr committed 2023-09-03 19:11:03 +10:00
1 parent ee4830d99e
commit 6cba0f1295
9 files changed
+127 -99

No files matched your search

+16 -16
View File
@@ -2,9 +2,9 @@
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="2812.0005"
height="612.00049"
viewBox="0 0 2812.0006 612.00049"
width="3012.0005"
height="812.00049"
viewBox="0 0 3012.0006 812.00049"
version="1.1"
id="svg16"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
@@ -1870,7 +1870,7 @@
<color-profile
name="Artifex-PS-CMYK-Profile"
xlink:href="/usr/share/color/icc/ghostscript/ps_cmyk.icc"
id="color-profile6530" />
id="color-profile3044" />
<clipPath
id="clipPath5977"
clipPathUnits="userSpaceOnUse">
@@ -2019,15 +2019,15 @@
id="g4989">
<polygon
style="fill:none;stroke:#f5f5f5;stroke-width:5.92435;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
points="100,10 190,190 10,190 "
points="190,190 10,190 100,10 "
id="polygon4983" />
<polygon
style="fill:none;stroke:#f5f5f5;stroke-width:5.92435;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
points="100,50 160,170 40,170 "
points="160,170 40,170 100,50 "
id="polygon4985" />
<polygon
style="fill:none;stroke:#f5f5f5;stroke-width:5.92435;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
points="100,90 130,150 70,150 "
points="130,150 70,150 100,90 "
id="polygon4987" />
</g>
</mask>
@@ -2612,8 +2612,8 @@
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.48663344"
inkscape:cx="271.2514"
inkscape:cy="79.114991"
inkscape:cx="1343.9274"
inkscape:cy="479.82728"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -2634,10 +2634,10 @@
inkscape:snap-object-midpoints="true"
inkscape:snap-others="true"
units="px"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
fit-margin-top="100"
fit-margin-left="100"
fit-margin-right="100"
fit-margin-bottom="100"
lock-margins="true">
<inkscape:grid
type="xygrid"
@@ -2645,8 +2645,8 @@
spacingx="5.0000001"
spacingy="5.0000001"
empspacing="10"
originx="6.0000129"
originy="6.0002754" />
originx="106.00002"
originy="106.00027" />
</sodipodi:namedview>
<metadata
id="metadata13">
@@ -2663,7 +2663,7 @@
inkscape:label="left"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-423.18811,331.95252)"
transform="translate(-323.18811,431.95252)"
style="display:inline">
<g
id="g2366"

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

+1 -1
View File
@@ -8,7 +8,7 @@ ScriptedImporter:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3}
svgType: 2
svgType: 0
texturedSpriteMeshType: 0
svgPixelsPerUnit: 100
gradientResolution: 64
+61 -69
View File
@@ -974,74 +974,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 7588376663361902483, guid: 73ab56de058af21389c312279181f856, type: 3}
m_PrefabInstance: {fileID: 494173778}
m_PrefabAsset: {fileID: 0}
--- !u!1 &50254257
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 50254260}
- component: {fileID: 50254259}
- component: {fileID: 50254258}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &50254258
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 50254257}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &50254259
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 50254257}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &50254260
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 50254257}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &52048083
GameObject:
m_ObjectHideFlags: 0
@@ -10104,6 +10036,10 @@ PrefabInstance:
propertyPath: m_Name
value: Menu
objectReference: {fileID: 0}
- target: {fileID: 3221660762140721390, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5313449993149091347, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
propertyPath: shipUi
value:
@@ -10183,7 +10119,13 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 3221660762140721390, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
insertIndex: -1
addedObject: {fileID: 943464875}
- targetCorrespondingSourceObject: {fileID: 3221660762140721390, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
insertIndex: -1
addedObject: {fileID: 943464874}
m_SourcePrefab: {fileID: 100100000, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
--- !u!1001 &328429983
PrefabInstance:
@@ -27097,6 +27039,56 @@ Transform:
m_CorrespondingSourceObject: {fileID: 7588376663361902483, guid: 73ab56de058af21389c312279181f856, type: 3}
m_PrefabInstance: {fileID: 942569358}
m_PrefabAsset: {fileID: 0}
--- !u!1 &943464869 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3221660762140721390, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
m_PrefabInstance: {fileID: 327871849}
m_PrefabAsset: {fileID: 0}
--- !u!114 &943464874
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 943464869}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_MoveRepeatDelay: 0.5
m_MoveRepeatRate: 0.1
m_XRTrackingOrigin: {fileID: 0}
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_DeselectOnBackgroundClick: 1
m_PointerBehavior: 0
m_CursorLockBehavior: 0
--- !u!114 &943464875
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 943464869}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 943464869}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!1001 &944480047
PrefabInstance:
m_ObjectHideFlags: 0
+20
View File
@@ -0,0 +1,20 @@
#Menu #main VisualElement {
flex-basis: 50%;
}
#logo {
background-color: rgba(0, 0, 0, 0);
background-image: url('project://database/Assets/SpaceRace.Logo.png?fileID=2800000&guid=d3ddae9037aad6b64ad0eef21e50b3cb&type=3#SpaceRace.Logo');
width: 512px;
height: 256px;
}
/*#exit {
width: 256px;
}
*/
Button {
background-color: rgba(0, 0, 0, 0.26);
color: rgb(255, 255, 255);
border-radius: 5px;
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 144cc2c04c975bad88fb864cea91f099
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0
+9 -10
View File
@@ -1,24 +1,23 @@
<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="main" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); justify-content: flex-start; flex-direction: row; align-items: flex-start;">
<Style src="project://database/Assets/Src/UI/Menu.uss?fileID=7433441132597879392&amp;guid=144cc2c04c975bad88fb864cea91f099&amp;type=3#Menu" />
<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; flex-direction: row;">
<ui:VisualElement name="nav" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0);">
<ui:VisualElement name="logo" />
<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;);" />
<ui:VisualElement name="tracks" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); justify-content: flex-start;">
<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;); -unity-font-style: bold;" />
<ui:VisualElement name="tracks">
<ui:Button text="sr_junglism" display-tooltip-when-elided="true" />
<ui:Button text="sr_silverstorage" display-tooltip-when-elided="true" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="settings" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: column; align-self: auto; align-items: flex-end; display: flex; visibility: hidden;">
<ui:Label tabindex="-1" text="SETTINGS" display-tooltip-when-elided="true" 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;);" />
<ui:VisualElement name="controls" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); font-size: 24px;">
<ui:VisualElement name="settings" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: column; display: flex; visibility: visible; align-items: flex-start;">
<ui:Label tabindex="-1" text="SETTINGS" display-tooltip-when-elided="true" style="-unity-font-style: bold;" />
<ui:VisualElement name="controls" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); font-size: 24px; align-items: flex-start;">
<ui:Toggle label="Invert Y" name="Toggle" tooltip="NYI" />
<ui:FloatField label="View Sensitivity" value="42.2" tooltip="NYI" />
</ui:VisualElement>
</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 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>
+1
View File
@@ -56,6 +56,7 @@ public class MenuControls : MonoBehaviour, SpaceRaceInput.IMenuActions {
UnityEngine.Cursor.lockState = CursorLockMode.None;
menuDoc.enabled = true;
menuUi.AddTracks();
menuUi.FocusTracks();
// TODO abstract all this cause it's shit
// take control off the ship
+5
View File
@@ -14,6 +14,11 @@ public class MenuUI : MonoBehaviour {
uiDocument = GetComponent<UIDocument>();
}
public void FocusTracks() {
Debug.Log("focusing");
uiDocument.rootVisualElement.Q<Button>().Focus();
}
public void AddTracks() {
SetupExit();
+3 -3
View File
@@ -84,9 +84,9 @@ BoostIndicator {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
align-self: center;
padding-left: 8px;
padding-right: 8px;
padding-top: 8px;
padding-left: 8px;
padding-right: 8px;
padding-top: 8px;
}
.bottom Label {