diff options
Diffstat (limited to 'code/ui')
| -rw-r--r-- | code/ui/Hud.razor | 4 | ||||
| -rw-r--r-- | code/ui/PlayerInfo.razor | 50 | ||||
| -rw-r--r-- | code/ui/health/Health.razor | 38 | ||||
| -rw-r--r-- | code/ui/mainmenu/MainMenu.razor | 22 | ||||
| -rw-r--r-- | code/ui/overlay/BlindedOverlay.Network.cs | 24 | ||||
| -rw-r--r-- | code/ui/overlay/BlindedOverlay.razor | 70 | ||||
| -rw-r--r-- | code/ui/overlay/RoleOverlay.cs | 24 | ||||
| -rw-r--r-- | code/ui/overlay/RoleOverlay.razor | 126 | ||||
| -rw-r--r-- | code/ui/phase/PhaseInfo.razor | 18 | ||||
| -rw-r--r-- | code/ui/phase/PhaseTimer.razor | 66 | ||||
| -rw-r--r-- | code/ui/team/TeamInfo.razor | 34 | ||||
| -rw-r--r-- | code/ui/weapon/Crosshair.razor | 16 |
12 files changed, 246 insertions, 246 deletions
diff --git a/code/ui/Hud.razor b/code/ui/Hud.razor index 6ea6103..7ec500e 100644 --- a/code/ui/Hud.razor +++ b/code/ui/Hud.razor @@ -6,12 +6,12 @@ @attribute [StyleSheet]
<style>
.hidden {
- display: none;
+ display: none;
}
</style>
<root>
- <BlindedOverlay/>
+ <BlindedOverlay/>
<RoleOverlay/>
<ChatBox/>
<VoiceList/>
diff --git a/code/ui/PlayerInfo.razor b/code/ui/PlayerInfo.razor index 53a71df..2acdef0 100644 --- a/code/ui/PlayerInfo.razor +++ b/code/ui/PlayerInfo.razor @@ -5,18 +5,18 @@ @inherits Panel
<style>
- playerinfo {
- position: absolute;
- left: 30px;
- bottom: 30px;
- background-color: rgba(0, 0, 0, 0.20);
- backdrop-filter-blur: 8px;
- display: flex;
- align-items: center;
- flex-direction: row;
- gap: 10px;
- padding: 10px;
- }
+playerinfo {
+ position: absolute;
+ left: 30px;
+ bottom: 30px;
+ background-color: rgba(0, 0, 0, 0.20);
+ backdrop-filter-blur: 8px;
+ display: flex;
+ align-items: center;
+ flex-direction: row;
+ gap: 10px;
+ padding: 10px;
+}
</style>
<Health Colour="@GetTeamColour()"></Health>
@@ -24,18 +24,18 @@ @code
{
- public string GetTeamColour()
- {
- var ClientPawn = Game.LocalPawn;
- if (ClientPawn is Player)
- {
- return TeamOperations.GetTeamColour(((Player)ClientPawn).CurrentTeam);
- }
- return "";
- }
+ public string GetTeamColour()
+ {
+ var ClientPawn = Game.LocalPawn;
+ if (ClientPawn is Player)
+ {
+ return TeamOperations.GetTeamColour(((Player)ClientPawn).CurrentTeam);
+ }
+ return "";
+ }
- protected override int BuildHash()
- {
- return GetTeamColour().GetHashCode();
- }
+ protected override int BuildHash()
+ {
+ return GetTeamColour().GetHashCode();
+ }
}
diff --git a/code/ui/health/Health.razor b/code/ui/health/Health.razor index 9d7037b..3da2c01 100644 --- a/code/ui/health/Health.razor +++ b/code/ui/health/Health.razor @@ -6,33 +6,33 @@ <style>
Health {
- width: 400px;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.90);
+ width: 400px;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.90);
}
.fill {
- height: 100%;
- transition: width 0.2s ease-out;
+ height: 100%;
+ transition: width 0.2s ease-out;
}
</style>
<div class="fill" style="background-color: @(Colour); width: @(GetHealth())%;"></div>
@code
{
- public string Colour { get; set; }
+ public string Colour { get; set; }
- public int GetHealth()
- {
- var ClientPawn = Game.LocalPawn;
- if (ClientPawn is Player)
- {
- return ClientPawn.Health.CeilToInt();
- }
- return 0;
- }
+ public int GetHealth()
+ {
+ var ClientPawn = Game.LocalPawn;
+ if (ClientPawn is Player)
+ {
+ return ClientPawn.Health.CeilToInt();
+ }
+ return 0;
+ }
- protected override int BuildHash()
- {
- return GetHealth().GetHashCode();
- }
+ protected override int BuildHash()
+ {
+ return GetHealth().GetHashCode();
+ }
}
diff --git a/code/ui/mainmenu/MainMenu.razor b/code/ui/mainmenu/MainMenu.razor index ffca318..ccdf17a 100644 --- a/code/ui/mainmenu/MainMenu.razor +++ b/code/ui/mainmenu/MainMenu.razor @@ -7,22 +7,22 @@ <style>
.wip-warning {
- position: absolute;
- z-index: 1000000;
- background-color: #FF4136;
- font-family: 'Roboto';
- font-size: 40px;
- width: 100%;
- font-weight: 700;
- display: flex;
- flex-direction: column;
- align-items: center;
+ position: absolute;
+ z-index: 1000000;
+ background-color: #FF4136;
+ font-family: 'Roboto';
+ font-size: 40px;
+ width: 100%;
+ font-weight: 700;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
}
</style>
<root class="gamemainmenu">
- <div class="wip-warning">Work in progress! Expect bugs, missing features, and general weird-ness. Things *will* break.</div>
+ <div class="wip-warning">Work in progress! Expect bugs, missing features, and general weird-ness. Things *will* break.</div>
<div class="navigator-canvas" slot="navigator-canvas"></div>
diff --git a/code/ui/overlay/BlindedOverlay.Network.cs b/code/ui/overlay/BlindedOverlay.Network.cs index c81751e..0a80628 100644 --- a/code/ui/overlay/BlindedOverlay.Network.cs +++ b/code/ui/overlay/BlindedOverlay.Network.cs @@ -4,17 +4,17 @@ namespace MurderGame; public partial class BlindedOverlay
{
- [ClientRpc]
- public static void Show( )
- {
- Instance.SetClass( "hidden", false );
- Instance.ShowOverlay = true;
- }
+ [ClientRpc]
+ public static void Show( )
+ {
+ Instance.SetClass( "hidden", false );
+ Instance.ShowOverlay = true;
+ }
- [ClientRpc]
- public static void Hide()
- {
- Instance.SetClass( "hidden", true );
- Instance.ShowOverlay = false;
- }
+ [ClientRpc]
+ public static void Hide()
+ {
+ Instance.SetClass( "hidden", true );
+ Instance.ShowOverlay = false;
+ }
}
diff --git a/code/ui/overlay/BlindedOverlay.razor b/code/ui/overlay/BlindedOverlay.razor index 024c31a..0cd397a 100644 --- a/code/ui/overlay/BlindedOverlay.razor +++ b/code/ui/overlay/BlindedOverlay.razor @@ -5,39 +5,39 @@ @inherits Panel
<style>
- @@keyframes fadeIn
- {
- 0% { opacity: 0; }
- 100% { opacity: 1; }
- }
- blindedoverlay
- {
- position: absolute;
- left: 0;
- top: 0;
- background-color: rgba(0, 0, 0, 0.80);
- width: 100vw;
- height: 100vh;
- backdrop-filter-blur: 16px;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- flex-direction: column;
- gap: 100vh;
- animation-name: fadeIn;
- animation-duration: 1s;
- animation-iteration-count: 1;
- animation-timing-function: linear;
- animation-fill-mode: forwards;
- }
- .overlay-message
- {
- margin: 20vh;
- color: white;
- font-size: 35px;
- font-family: "Roboto";
- font-weight: 700;
- }
+@@keyframes fadeIn
+{
+ 0% { opacity: 0; }
+ 100% { opacity: 1; }
+}
+blindedoverlay
+{
+ position: absolute;
+ left: 0;
+ top: 0;
+ background-color: rgba(0, 0, 0, 0.80);
+ width: 100vw;
+ height: 100vh;
+ backdrop-filter-blur: 16px;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ flex-direction: column;
+ gap: 100vh;
+ animation-name: fadeIn;
+ animation-duration: 1s;
+ animation-iteration-count: 1;
+ animation-timing-function: linear;
+ animation-fill-mode: forwards;
+}
+.overlay-message
+{
+ margin: 20vh;
+ color: white;
+ font-size: 35px;
+ font-family: "Roboto";
+ font-weight: 700;
+}
</style>
<div class="overlay-message">
@@ -50,14 +50,14 @@ You shot a bystander! public bool ShowOverlay { get; set; } = false;
- public BlindedOverlay()
+ public BlindedOverlay()
{
SetClass( "hidden", true );
Instance = this;
}
- protected override int BuildHash()
+ protected override int BuildHash()
{
return ShowOverlay.GetHashCode();
}
diff --git a/code/ui/overlay/RoleOverlay.cs b/code/ui/overlay/RoleOverlay.cs index 84758b7..300d0bf 100644 --- a/code/ui/overlay/RoleOverlay.cs +++ b/code/ui/overlay/RoleOverlay.cs @@ -4,17 +4,17 @@ namespace MurderGame; public partial class RoleOverlay
{
- [ClientRpc]
- public static void Show( )
- {
- Instance.SetClass( "hidden", false );
- Instance.ShowOverlay = true;
- }
+ [ClientRpc]
+ public static void Show( )
+ {
+ Instance.SetClass( "hidden", false );
+ Instance.ShowOverlay = true;
+ }
- [ClientRpc]
- public static void Hide()
- {
- Instance.SetClass( "hidden", true );
- Instance.ShowOverlay = false;
- }
+ [ClientRpc]
+ public static void Hide()
+ {
+ Instance.SetClass( "hidden", true );
+ Instance.ShowOverlay = false;
+ }
}
diff --git a/code/ui/overlay/RoleOverlay.razor b/code/ui/overlay/RoleOverlay.razor index c41e359..40cbce0 100644 --- a/code/ui/overlay/RoleOverlay.razor +++ b/code/ui/overlay/RoleOverlay.razor @@ -6,87 +6,87 @@ @inherits Panel
<style>
- roleoverlay
- {
- position: absolute;
- left: 0;
- top: 0;
- background-color: #000000;
- width: 100vw;
- height: 100vh;
- z-index: 10000;
- }
- .container {
- display: flex;
- align-items: center;
- flex-direction: column;
- max-width: 700px;
- text-align: center;
- gap: 50px;
- margin: 0 auto;
- top: 200px;
- }
- .name
- {
- font-size: 50;
- font-weight: 700;
- font-family: "Roboto";
- }
- .description
- {
- font-size: 30;
- font-family: "Roboto";
- }
+roleoverlay
+{
+ position: absolute;
+ left: 0;
+ top: 0;
+ background-color: #000000;
+ width: 100vw;
+ height: 100vh;
+ z-index: 10000;
+}
+.container {
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ max-width: 700px;
+ text-align: center;
+ gap: 50px;
+ margin: 0 auto;
+ top: 200px;
+}
+.name
+{
+ font-size: 50;
+ font-weight: 700;
+ font-family: "Roboto";
+}
+.description
+{
+ font-size: 30;
+ font-family: "Roboto";
+}
</style>
<div class="container">
- <div class="name" style="color: @(GetTeamColour())">
- @GetTeamName()
- </div>
- <div class="description" style="color: @(GetTeamColour())">
- @GetTeamDescription()
- </div>
+ <div class="name" style="color: @(GetTeamColour())">
+ @GetTeamName()
+ </div>
+ <div class="description" style="color: @(GetTeamColour())">
+ @GetTeamDescription()
+ </div>
</div>
@code
{
- public string GetTeamName()
- {
- if (Game.LocalPawn is Player player)
- {
- return TeamOperations.GetTeamName(player.CurrentTeam);
- }
- return "";
- }
- public string GetTeamDescription()
- {
- if (Game.LocalPawn is Player player)
- {
- return TeamOperations.GetTeamDescription(player.CurrentTeam);
- }
- return "";
- }
- public string GetTeamColour()
- {
- if (Game.LocalPawn is Player player)
- {
- return TeamOperations.GetTeamColour(player.CurrentTeam);
- }
- return "";
- }
+ public string GetTeamName()
+ {
+ if (Game.LocalPawn is Player player)
+ {
+ return TeamOperations.GetTeamName(player.CurrentTeam);
+ }
+ return "";
+ }
+ public string GetTeamDescription()
+ {
+ if (Game.LocalPawn is Player player)
+ {
+ return TeamOperations.GetTeamDescription(player.CurrentTeam);
+ }
+ return "";
+ }
+ public string GetTeamColour()
+ {
+ if (Game.LocalPawn is Player player)
+ {
+ return TeamOperations.GetTeamColour(player.CurrentTeam);
+ }
+ return "";
+ }
public static RoleOverlay Instance { get; private set; }
public bool ShowOverlay { get; set; } = false;
- public RoleOverlay()
+ public RoleOverlay()
{
SetClass( "hidden", true );
Instance = this;
}
- protected override int BuildHash()
+ protected override int BuildHash()
{
return ShowOverlay.GetHashCode();
}
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()); + }
}
diff --git a/code/ui/team/TeamInfo.razor b/code/ui/team/TeamInfo.razor index 18e1f7f..883dcf0 100644 --- a/code/ui/team/TeamInfo.razor +++ b/code/ui/team/TeamInfo.razor @@ -6,9 +6,9 @@ <style>
.team-info {
- font-size: 35px;
- font-weight: 700;
- font-family: "Roboto";
+ font-size: 35px;
+ font-weight: 700;
+ font-family: "Roboto";
}
</style>
@@ -18,20 +18,20 @@ @code
{
- public string Colour { get; set; }
+ public string Colour { get; set; }
- public string GetTeamName()
- {
- var ClientPawn = Game.LocalPawn;
- if (ClientPawn is Player)
- {
- return TeamOperations.GetTeamName(((Player)ClientPawn).CurrentTeam);
- }
- return "";
- }
+ public string GetTeamName()
+ {
+ var ClientPawn = Game.LocalPawn;
+ if (ClientPawn is Player)
+ {
+ return TeamOperations.GetTeamName(((Player)ClientPawn).CurrentTeam);
+ }
+ return "";
+ }
- protected override int BuildHash()
- {
- return GetTeamName().GetHashCode();
- }
+ protected override int BuildHash()
+ {
+ return GetTeamName().GetHashCode();
+ }
}
diff --git a/code/ui/weapon/Crosshair.razor b/code/ui/weapon/Crosshair.razor index 2dc5db1..92cdcd3 100644 --- a/code/ui/weapon/Crosshair.razor +++ b/code/ui/weapon/Crosshair.razor @@ -6,16 +6,16 @@ <style>
crosshair {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
}
.dot {
- border-radius: 3px;
- width: 6px;
- height: 6px;
- background-color: white;
+ border-radius: 3px;
+ width: 6px;
+ height: 6px;
+ background-color: white;
}
</style>
|
