aboutsummaryrefslogtreecommitdiffstats
path: root/code/ui/phase/PhaseTimer.razor
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2023-07-27 22:30:22 +0100
committerLeonardo Bishop <me@leonardobishop.com>2023-07-27 22:30:22 +0100
commit8b69e65e51507118b014a0426ae6f957b78a0707 (patch)
treec1507990c5f5cc05a4e9000c295618ac85524f9a /code/ui/phase/PhaseTimer.razor
parent71db52c5443a7bf82d9a23a770994a42b043be04 (diff)
Reformat
Diffstat (limited to 'code/ui/phase/PhaseTimer.razor')
-rw-r--r--code/ui/phase/PhaseTimer.razor66
1 files changed, 33 insertions, 33 deletions
diff --git a/code/ui/phase/PhaseTimer.razor b/code/ui/phase/PhaseTimer.razor
index 1fb0baa..9293976 100644
--- a/code/ui/phase/PhaseTimer.razor
+++ b/code/ui/phase/PhaseTimer.razor
@@ -7,55 +7,55 @@
<style>
phasetimer {
- position: absolute;
- top: 0;
- width: 100%;
- margin: 30px auto;
- display: flex;
- flex-direction: column;
- align-items: center;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ margin: 30px auto;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
}
.box {
- background-color: rgba(0, 0, 0, 0.20);
- backdrop-filter-blur: 8px;
- padding: 5px;
- color: white;
- font-weight: 700;
- font-size: 30px;
- font-family: "Roboto";
+ background-color: rgba(0, 0, 0, 0.20);
+ backdrop-filter-blur: 8px;
+ padding: 5px;
+ color: white;
+ font-weight: 700;
+ font-size: 30px;
+ font-family: "Roboto";
}
</style>
@if (HasTime())
{
<div class="box">
- @GetTime()
+ @GetTime()
</div>
} else
{
<div class="box">
- @GetPhase()
+ @GetPhase()
</div>
}
@code
{
- public bool HasTime()
- {
- return MurderGame.Instance.CurrentPhase.TimeLeft >= 0;
- }
- public string GetTime()
- {
- TimeSpan timeSpan = TimeSpan.FromSeconds(MurderGame.Instance.CurrentPhase.TimeLeft);
- return timeSpan.ToString(@"mm\:ss");
- }
- public string GetPhase()
- {
- return MurderGame.Instance.CurrentPhase.Title;
- }
+ public bool HasTime()
+ {
+ return MurderGame.Instance.CurrentPhase.TimeLeft >= 0;
+ }
+ public string GetTime()
+ {
+ TimeSpan timeSpan = TimeSpan.FromSeconds(MurderGame.Instance.CurrentPhase.TimeLeft);
+ return timeSpan.ToString(@"mm\:ss");
+ }
+ public string GetPhase()
+ {
+ return MurderGame.Instance.CurrentPhase.Title;
+ }
- protected override int BuildHash()
- {
- return HashCode.Combine(MurderGame.Instance.CurrentPhase.TimeLeft.GetHashCode(), MurderGame.Instance.CurrentPhase.Title.GetHashCode());
- }
+ protected override int BuildHash()
+ {
+ return HashCode.Combine(MurderGame.Instance.CurrentPhase.TimeLeft.GetHashCode(), MurderGame.Instance.CurrentPhase.Title.GetHashCode());
+ }
}