diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2023-07-31 03:02:21 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2023-07-31 03:02:21 +0100 |
| commit | 8f2481f8fb66ed519cb7d39dbe59bc4bada1d696 (patch) | |
| tree | 187d7fbc1d1124c88ed38a272dce6b279bac7768 /code/ui | |
| parent | 7cc6031dc112f72698d60e4e42453cb9bef09351 (diff) | |
Adjust colours
Diffstat (limited to 'code/ui')
| -rw-r--r-- | code/ui/character/LookingAtInfo.razor | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/code/ui/character/LookingAtInfo.razor b/code/ui/character/LookingAtInfo.razor index 4a54b81..098feb4 100644 --- a/code/ui/character/LookingAtInfo.razor +++ b/code/ui/character/LookingAtInfo.razor @@ -41,13 +41,13 @@ lookingatinfo { public string GetLookingAtName()
{
if (Game.LocalPawn is not Player player) return "";
- return player.LookingAt is not { } lookingAt ? "" : lookingAt.CharacterName;
+ return player.LookingAt is not { } lookingAt ? "" : (lookingAt.CharacterName ?? lookingAt.Client.Name);
}
public string GetLookingAtColour()
{
if (Game.LocalPawn is not Player player) return "white";
- return player.LookingAt is not { } lookingAt ? "white" : lookingAt.HexColor;
+ return player.LookingAt is not { } lookingAt ? "white" : (string.IsNullOrWhiteSpace(lookingAt.HexColor) ? "white" : lookingAt.HexColor);
}
protected override int BuildHash()
|
