fix controls ui on widescreens

This commit is contained in:
Nathan Rashleigh committed 2025-10-17 18:45:58 +11:00
1 parent f56fbe32cc
commit 7d8cdb8d6e
6 files changed
+81 -80

No files matched your search

Binary file not shown.
Binary file not shown.
Regular → Executable
+36 -36
View File
@@ -1,36 +1,36 @@
<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="VisualElement" style="-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; flex-direction: row; flex-grow: 1;">
<ui:VisualElement name="left" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); justify-content: center; align-items: center;" />
<ui:VisualElement name="middle" style="justify-content: flex-end; width: 20%;">
<ui:VisualElement name="speedCtr" style="flex-direction: row; justify-content: center; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/JuraMono.otf?fileID=12800000&amp;guid=1fa2831c8e49fdb3b95b577bdad2bc50&amp;type=3#JuraMono&apos;);">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="speed" style="min-width: 5%; -unity-text-align: upper-right; flex-basis: 10%;" />
<ui:Label tabindex="-1" text="u/s" display-tooltip-when-elided="true" name="units" style="flex-basis: 10%; -unity-text-align: upper-left;" />
</ui:VisualElement>
<ui:VisualElement name="boostBarCtr" class="boostBarCtr">
<BoostComponents.BoostBar progress="0.66" name="boostBar" charges="2" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="puCtr" style="flex-direction: row; flex-grow: 0; justify-content: space-around; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/JuraMono.otf?fileID=12800000&amp;guid=1fa2831c8e49fdb3b95b577bdad2bc50&amp;type=3#JuraMono&apos;);">
<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;" />
<BoostComponents.BoostIndicator name="BoostIndicator" progress="0.9" style="height: 1%;" />
<BoostComponents.BoostIndicator name="BoostIndicator" progress="0.25" style="height: 1%;" />
</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;" />
<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="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);">
<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;" />
<BoostComponents.BoostIndicator name="BoostIndicator" progress="0.5" style="height: 1%;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="middleBottom" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); flex-shrink: 0; flex-basis: 20%;" />
</ui:VisualElement>
<ui:VisualElement name="right" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); justify-content: center; align-items: center;" />
</ui:VisualElement>
</ui:UXML>
<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="VisualElement" style="-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; flex-direction: row; flex-grow: 1;">
<ui:VisualElement name="left" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); justify-content: center; align-items: center;" />
<ui:VisualElement name="middle" style="justify-content: flex-end; width: 20%;">
<ui:VisualElement name="speedCtr" style="flex-direction: row; justify-content: center; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/JuraMono.otf?fileID=12800000&amp;guid=1fa2831c8e49fdb3b95b577bdad2bc50&amp;type=3#JuraMono&apos;);">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="speed" style="min-width: 5%; -unity-text-align: upper-right; flex-basis: 10%;" />
<ui:Label tabindex="-1" text="u/s" display-tooltip-when-elided="true" name="units" style="flex-basis: 10%; -unity-text-align: upper-left;" />
</ui:VisualElement>
<ui:VisualElement name="boostBarCtr" class="boostBarCtr">
<BoostComponents.BoostBar progress="0.66" name="boostBar" charges="2" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="puCtr" style="flex-direction: row; flex-grow: 0; justify-content: space-around; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/JuraMono.otf?fileID=12800000&amp;guid=1fa2831c8e49fdb3b95b577bdad2bc50&amp;type=3#JuraMono&apos;);">
<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;" />
<BoostComponents.BoostIndicator name="BoostIndicator" progress="0.9" style="height: 1%;" />
<BoostComponents.BoostIndicator name="BoostIndicator" progress="0.25" style="height: 1%;" />
</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;" />
<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="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);">
<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;" />
<BoostComponents.BoostIndicator name="BoostIndicator" progress="0.5" style="height: 1%;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="middleBottom" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); flex-shrink: 1; flex-basis: 20%;" />
</ui:VisualElement>
<ui:VisualElement name="right" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); justify-content: center; align-items: center;" />
</ui:VisualElement>
</ui:UXML>
Regular → Executable
+41 -41
View File
@@ -1,41 +1,41 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" 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="shipUi" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); color: rgb(255, 255, 255); font-size: 28px; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/JuraMono.otf?fileID=12800000&amp;guid=1fa2831c8e49fdb3b95b577bdad2bc50&amp;type=3#JuraMono&apos;); -unity-font-definition: initial;">
<ui:VisualElement name="Top" style="flex-grow: 1; font-size: 12px;" />
<ui:VisualElement name="Middle" style="flex-grow: 1; align-items: center;" />
<ui:VisualElement name="Bottom" class="bottom">
<ui:VisualElement name="notice" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0);">
<ui:VisualElement name="timerDesc" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: row; justify-content: space-between; align-items: auto; width: auto; align-self: stretch; flex-shrink: 0; font-size: 14px; color: rgb(245, 245, 245);">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="noticeMsg" style="align-self: flex-end; align-items: auto; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/Jura-Regular.otf?fileID=12800000&amp;guid=11752fd494516326b889605754cb9e26&amp;type=3#Jura-Regular&apos;);" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="noticePosition" text="5 / 128" style="-unity-text-align: upper-right;" />
</ui:VisualElement>
<ui:VisualElement name="noticeLap" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: row; justify-content: space-between; align-items: auto; width: auto; align-self: stretch; flex-shrink: 0;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="noticeTime" text="1:12.888" style="align-self: flex-end; align-items: auto;" />
<ui:VisualElement name="noticeDiff" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); -unity-text-align: upper-right;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" text="+0.128" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="noticeSectors" class="sectors" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); flex-direction: row; -unity-text-align: upper-left;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="yellow" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="green middle" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="purple" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="timer" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0);">
<ui:VisualElement name="timerDesc" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: row; justify-content: space-between; align-items: auto; width: auto; align-self: stretch; flex-shrink: 0; font-size: 14px; color: rgb(245, 245, 245);">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="msg" style="align-self: flex-end; align-items: auto; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/Jura-Regular.otf?fileID=12800000&amp;guid=11752fd494516326b889605754cb9e26&amp;type=3#Jura-Regular&apos;);" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="timerPosition" text="5 / 128" style="-unity-text-align: upper-right;" />
</ui:VisualElement>
<ui:VisualElement name="timerLap" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: row; justify-content: space-between; align-items: auto; width: auto; align-self: stretch; flex-shrink: 0;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="timerTime" style="align-self: flex-end; align-items: auto;" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="timerPb" style="-unity-text-align: upper-right;" />
</ui:VisualElement>
<ui:VisualElement name="timerSectors" class="sectors" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); flex-direction: row; align-self: stretch; align-items: auto;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="yellow" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="green" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="purple" />
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" 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="shipUi" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); color: rgb(255, 255, 255); font-size: 28px; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/JuraMono.otf?fileID=12800000&amp;guid=1fa2831c8e49fdb3b95b577bdad2bc50&amp;type=3#JuraMono&apos;); -unity-font-definition: initial;">
<ui:VisualElement name="Top" style="flex-grow: 1; font-size: 12px;" />
<ui:VisualElement name="Middle" style="flex-grow: 1; align-items: center;" />
<ui:VisualElement name="Bottom" class="bottom" style="max-height: 25%;">
<ui:VisualElement name="notice" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0);">
<ui:VisualElement name="timerDesc" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: row; justify-content: space-between; align-items: auto; width: auto; align-self: stretch; flex-shrink: 0; font-size: 14px; color: rgb(245, 245, 245);">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="noticeMsg" style="align-self: flex-end; align-items: auto; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/Jura-Regular.otf?fileID=12800000&amp;guid=11752fd494516326b889605754cb9e26&amp;type=3#Jura-Regular&apos;);" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="noticePosition" text="5 / 128" style="-unity-text-align: upper-right;" />
</ui:VisualElement>
<ui:VisualElement name="noticeLap" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: row; justify-content: space-between; align-items: auto; width: auto; align-self: stretch; flex-shrink: 0;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="noticeTime" text="1:12.888" style="align-self: flex-end; align-items: auto;" />
<ui:VisualElement name="noticeDiff" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); -unity-text-align: upper-right;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" text="+0.128" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="noticeSectors" class="sectors" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); flex-direction: row; -unity-text-align: upper-left;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="yellow" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="green middle" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="purple" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="timer" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0);">
<ui:VisualElement name="timerDesc" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: row; justify-content: space-between; align-items: auto; width: auto; align-self: stretch; flex-shrink: 0; font-size: 14px; color: rgb(245, 245, 245);">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="msg" style="align-self: flex-end; align-items: auto; -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/Jura-Regular.otf?fileID=12800000&amp;guid=11752fd494516326b889605754cb9e26&amp;type=3#Jura-Regular&apos;);" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="timerPosition" text="5 / 128" style="-unity-text-align: upper-right;" />
</ui:VisualElement>
<ui:VisualElement name="timerLap" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: row; justify-content: space-between; align-items: auto; width: auto; align-self: stretch; flex-shrink: 0;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="timerTime" style="align-self: flex-end; align-items: auto;" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="timerPb" style="-unity-text-align: upper-right;" />
</ui:VisualElement>
<ui:VisualElement name="timerSectors" class="sectors" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); flex-direction: row; align-self: stretch; align-items: auto;">
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="yellow" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="green" />
<ui:Label tabindex="-1" display-tooltip-when-elided="true" class="purple" />
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>
+1 -1
View File
@@ -21,7 +21,7 @@ MonoBehaviour:
m_FallbackDpi: 96
m_ReferenceResolution: {x: 1440, y: 1080}
m_ScreenMatchMode: 0
m_Match: 0
m_Match: 0.5
m_SortingOrder: 0
m_TargetDisplay: 0
m_ClearDepthStencil: 1