mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-28 13:09:51 +01:00
feat: percentage
This commit is contained in:
1 parent
1b88773e28
commit
ecc029402e
1 file changed
+14
-8
@@ -179,11 +179,7 @@ export default function Page() {
|
|||||||
height: '100%',
|
height: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text
|
<Text style={{ textAlign: 'center' }} wrap="nowrap">
|
||||||
style={{
|
|
||||||
textAlign: 'center',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{display
|
{display
|
||||||
? display(stats[index])
|
? display(stats[index])
|
||||||
: decimals === undefined
|
: decimals === undefined
|
||||||
@@ -206,6 +202,16 @@ export default function Page() {
|
|||||||
)
|
)
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{deltaMode === 'percentage' && (
|
||||||
|
<Text color="gray">
|
||||||
|
(
|
||||||
|
{`${deltaPercentage > 0 ? '+' : ''}${Math.round(
|
||||||
|
deltaPercentage * 100,
|
||||||
|
)}%`}
|
||||||
|
)
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
@@ -416,17 +422,17 @@ export default function Page() {
|
|||||||
<Row name="Speed backwards" value="speedBackwards" decimals={0} />
|
<Row name="Speed backwards" value="speedBackwards" decimals={0} />
|
||||||
<Row name="Engine power" value="enginePower" decimals={0} />
|
<Row name="Engine power" value="enginePower" decimals={0} />
|
||||||
<Row
|
<Row
|
||||||
name="Power to weight ratio on hard terrain"
|
name="Power to weight ratio hard terrain"
|
||||||
value="powerToWeightRatioHardTerrain"
|
value="powerToWeightRatioHardTerrain"
|
||||||
decimals={1}
|
decimals={1}
|
||||||
/>
|
/>
|
||||||
<Row
|
<Row
|
||||||
name="Power to weight ratio on medium terrain"
|
name="Power to weight ratio medium terrain"
|
||||||
value="powerToWeightRatioMediumTerrain"
|
value="powerToWeightRatioMediumTerrain"
|
||||||
decimals={1}
|
decimals={1}
|
||||||
/>
|
/>
|
||||||
<Row
|
<Row
|
||||||
name="Power to weight ratio on soft terrain"
|
name="Power to weight ratio soft terrain"
|
||||||
value="powerToWeightRatioSoftTerrain"
|
value="powerToWeightRatioSoftTerrain"
|
||||||
decimals={1}
|
decimals={1}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in new issue
Block a user