Limit displayed negative result values to 0
This commit is contained in:
parent
30df91771e
commit
91b6a6262d
@ -34,6 +34,7 @@
|
|||||||
var danClearStateString = GetDanClearStateString(danResultState);
|
var danClearStateString = GetDanClearStateString(danResultState);
|
||||||
}
|
}
|
||||||
<img src=@($"/images/dani_{danResultState.ToString()}.png") style="max-width:150px; width:100%;" alt="danResultState.ToString()"/>
|
<img src=@($"/images/dani_{danResultState.ToString()}.png") style="max-width:150px; width:100%;" alt="danResultState.ToString()"/>
|
||||||
|
<MudText Typo="Typo.body1">@danClearStateString</MudText>
|
||||||
</MudStack>
|
</MudStack>
|
||||||
</MudCardContent>
|
</MudCardContent>
|
||||||
</MudCard>
|
</MudCard>
|
||||||
@ -296,8 +297,11 @@
|
|||||||
resultText = "Gold";
|
resultText = "Gold";
|
||||||
}
|
}
|
||||||
|
|
||||||
<MudProgressLinear Class="@barClass" Rounded="true" Size="Size.Large" Max="@redRequirement" Value="@(redRequirement - bestData)">
|
var resultValue = redRequirement - bestData;
|
||||||
<MudText Typo="Typo.caption">@(redRequirement - bestData)</MudText>
|
if (resultValue < 0) resultValue = 0;
|
||||||
|
|
||||||
|
<MudProgressLinear Class="@barClass" Rounded="true" Size="Size.Large" Max="@redRequirement" Value="@resultValue">
|
||||||
|
<MudText Typo="Typo.caption">@resultValue</MudText>
|
||||||
</MudProgressLinear>
|
</MudProgressLinear>
|
||||||
<MudText Typo="Typo.caption" Style="text-align: right">@resultText</MudText>
|
<MudText Typo="Typo.caption" Style="text-align: right">@resultText</MudText>
|
||||||
}
|
}
|
||||||
@ -385,9 +389,11 @@
|
|||||||
barClass = "bar-pass-gold";
|
barClass = "bar-pass-gold";
|
||||||
resultText = "Gold";
|
resultText = "Gold";
|
||||||
}
|
}
|
||||||
|
var resultValue = redRequirement - bestData;
|
||||||
|
if (resultValue < 0) resultValue = 0;
|
||||||
|
|
||||||
<MudProgressLinear Class="@barClass" Rounded="true" Size="Size.Large" Max="@redRequirement" Value="@(redRequirement - bestData)">
|
<MudProgressLinear Class="@barClass" Rounded="true" Size="Size.Large" Max="@redRequirement" Value="@resultValue">
|
||||||
<MudText Typo="Typo.caption">@(redRequirement - bestData)</MudText>
|
<MudText Typo="Typo.caption">@resultValue</MudText>
|
||||||
</MudProgressLinear>
|
</MudProgressLinear>
|
||||||
<MudText Typo="Typo.caption" Style="text-align: right">@resultText</MudText>
|
<MudText Typo="Typo.caption" Style="text-align: right">@resultText</MudText>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user