diff options
Diffstat (limited to 'code/ui/phase')
| -rw-r--r-- | code/ui/phase/PhaseInfo.razor | 18 | ||||
| -rw-r--r-- | code/ui/phase/PhaseTimer.razor | 66 |
2 files changed, 42 insertions, 42 deletions
diff --git a/code/ui/phase/PhaseInfo.razor b/code/ui/phase/PhaseInfo.razor index 74bf237..4509259 100644 --- a/code/ui/phase/PhaseInfo.razor +++ b/code/ui/phase/PhaseInfo.razor @@ -6,18 +6,18 @@ @attribute [StyleSheet]
<div>
- @GetPhase().Title
+ @GetPhase().Title
</div>
@code
{
- public BasePhase GetPhase()
- {
- return MurderGame.Instance.CurrentPhase;
- }
+ public BasePhase GetPhase()
+ {
+ return MurderGame.Instance.CurrentPhase;
+ }
- protected override int BuildHash() - { - return GetPhase().GetHashCode(); - }
+ protected override int BuildHash() + { + return GetPhase().GetHashCode(); + }
}
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()); + }
}
|
